{
  "id": "flutter/scroll-controller-not-attached",
  "signature": "FlutterError: ScrollController not attached to any scroll views.",
  "signature_zh": "FlutterError: ScrollController 未附加到任何滚动视图。",
  "regex": "FlutterError: ScrollController not attached to any scroll views",
  "domain": "flutter",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "ScrollController used after being disposed or before being attached to a Scrollable widget.",
  "root_cause_type": "generic",
  "root_cause_zh": "ScrollController 在释放后使用，或在附加到 Scrollable 小部件之前使用。",
  "versions": [
    {
      "version": "3.10.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.13.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.16.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.22.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Disposing the controller before it's attached prevents any scrolling functionality.",
      "fail_rate": 0.45,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Creates memory leaks and detached controllers that accumulate.",
      "fail_rate": 0.3,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Does not fix the underlying lifecycle issue; scrolling will silently fail.",
      "fail_rate": 0.25,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Ensure ScrollController is created once (e.g., in initState) and disposed in dispose(). Use a StatefulWidget.",
      "success_rate": 0.85,
      "how": "Ensure ScrollController is created once (e.g., in initState) and disposed in dispose(). Use a StatefulWidget.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use ScrollController.keepScrollOffset() or check _controller.hasClients before accessing scroll position.",
      "success_rate": 0.75,
      "how": "Use ScrollController.keepScrollOffset() or check _controller.hasClients before accessing scroll position.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Switch to ScrollableState or use NotificationListener<ScrollNotification> to avoid explicit controller management.",
      "success_rate": 0.7,
      "how": "Switch to ScrollableState or use NotificationListener<ScrollNotification> to avoid explicit controller management.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Ensure ScrollController is created once (e.g., in initState) and disposed in dispose(). Use a StatefulWidget.",
    "Use ScrollController.keepScrollOffset() or check _controller.hasClients before accessing scroll position.",
    "Switch to ScrollableState or use NotificationListener<ScrollNotification> to avoid explicit controller management."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://api.flutter.dev/flutter/widgets/ScrollController-class.html",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.88,
  "resolvable": "true",
  "first_seen": "2023-06-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}