{
  "id": "flutter/invalid-runtime-type-cast",
  "signature": "type 'List<dynamic>' is not a subtype of type 'List<String>' in type cast",
  "signature_zh": "类型 'List<dynamic>' 不是类型 'List<String>' 的子类型，在类型转换中",
  "regex": "type 'List<dynamic>' is not a subtype of type 'List<.*>' in type cast",
  "domain": "flutter",
  "category": "type_error",
  "subcategory": null,
  "root_cause": "Casting a decoded JSON list directly to `List<String>` without explicit type checking; JSON decode returns `List<dynamic>`.",
  "root_cause_type": "generic",
  "root_cause_zh": "在未进行显式类型检查的情况下，直接将解码后的 JSON 列表转换为 `List<String>`；JSON 解码返回 `List<dynamic>`。",
  "versions": [
    {
      "version": "2.17.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.0.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.22.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "If any element is not a String, `cast()` throws a runtime error; does not handle mixed types.",
      "fail_rate": 0.3,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Type cast fails at runtime; app crashes when the list is accessed.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Swallows the error but the list remains untyped; subsequent operations may fail silently.",
      "fail_rate": 0.2,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Use `List<String>.from()` or `jsonDecode(data).cast<String>().toList()` to safely convert with type checking.",
      "success_rate": 0.95,
      "how": "Use `List<String>.from()` or `jsonDecode(data).cast<String>().toList()` to safely convert with type checking.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Decode with explicit type using `jsonDecode` and then iterate to filter or convert each element.",
      "success_rate": 0.9,
      "how": "Decode with explicit type using `jsonDecode` and then iterate to filter or convert each element.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use a JSON serialization library like `json_serializable` with proper model classes to avoid raw casts.",
      "success_rate": 0.85,
      "how": "Use a JSON serialization library like `json_serializable` with proper model classes to avoid raw casts.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Use `List<String>.from()` or `jsonDecode(data).cast<String>().toList()` to safely convert with type checking.",
    "Decode with explicit type using `jsonDecode` and then iterate to filter or convert each element.",
    "Use a JSON serialization library like `json_serializable` with proper model classes to avoid raw casts."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://dart.dev/guides/language/type-system",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.9,
  "fix_success_rate": 0.95,
  "resolvable": "true",
  "first_seen": "2023-02-01",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}