Unhandled Exception: type '_InternalLinkedHashMap<String, dynamic>' is not a subtype of type 'Iterable<dynamic>' flutter Unhandled Exception: type '_InternalLinkedHashMap<String, dynamic>' is not a subtype of type 'Iterable<dynamic>' flutter flutter 567 Solution 1 This one should solve your problem if you want get a list Do not hesitate to share your response here to help other visitors like you. You can configure your generator to use anyMap see https://pub.dartlang.org/packages/json_serializable under Build Configuration set any_map: true and you should be good! In my case, I had a Map of another serializable object. With the help of index and the list object I have printed the items dynamically from the JSON file. Learning Dart programming online free from beginning with our easy to follow tutorials, examples, exercises, mcq and references. By clicking Post Your Answer, you agree to our terms of service, privacy policy and cookie policy. Otherwise it's too much guess work. 2 )use response.toString() instead of data in dio. Why did it take so long for Europeans to adopt the moldboard plow? . eg in PHP FlutterFlutter!""FlutterGoogleUIiOSAndroidFuchsia20175 Flutter6020185 . There was a similar discussion here about casting nested lists: https://github.com/dart-lang/language/issues/1574. If it's a List then do what you currently have, if not then, you process it differently. Assuming a person has water/ice magic, is it even semi-possible that they'd be able to create various light effects with their magic? rev2023.1.18.43174. Could you point out which line it is pointing to? It is one object with properties and values. How were Acorn Archimedes used outside education? Following is the code that I have written. If it's a List then do what you currently have, if not then, you process it differently. Map<String, String> stringParams = {}; // or var stringParams = <String, String>{}; Use Map to decode the JSON file. I'm failing to cast a Map
into a Map. What non-academic job options are there for a PhD in algebraic topology? Yes, if your json text says something like: Eroor : Type '_InternalLinkedHashMap' is not a subtype of type 'List' in type cast, https://flutter.dev/docs/cookbook/networking/fetch-data#complete-example, Microsoft Azure joins Collectives on Stack Overflow. I need a 'standard array' for a D&D-like homebrew game, but anydice chokes - how to proceed? How Intuit improves security, latency, and development velocity with a Site Maintenance - Friday, January 20, 2023 02:00 - 05:00 UTC (Thursday, Jan Were bringing advertisements for technology courses to Stack Overflow, type 'List' is not a subtype of type 'List', Flutter http Error type '_InternalLinkedHashMap' is not a subtype of type 'Map', type '_InternalLinkedHashMap' is not a subtype of type 'List