Skip to content

Unhandled exception: type 'List<dynamic>' is not a subtype of type 'List<Photo>' #17008

@starlight173

Description

@starlight173

I'm using the example code in the doc: https://flutter.io/cookbook/networking/background-parsing/

Unhandled exception:
type 'List' is not a subtype of type 'List' where
[VERBOSE-2:dart_isolate.cc(711)] Isolate (1067271284) 'main.dart:_spawn()' exited with an error
[VERBOSE-2:dart_error.cc(16)] Unhandled exception:
type 'List' is not a subtype of type 'List' where
List is from dart:core
List is from dart:core
Photo is from file:///Users/kwangluu/Workingspace/FlutterProjects/bg_json_parsing/lib/main.dart

#0 parsePhotos (file:///Users/kwangluu/Workingspace/FlutterProjects/bg_json_parsing/lib/main.dart:20:57)
#1 _IsolateConfiguration.apply (package:flutter/src/foundation/isolates.dart:88:16)
#2 _spawn. (package:flutter/src/foundation/isolates.dart:96:30)
#3 Timeline.timeSync (dart:developer/timeline.dart:168:22)
#4 _spawn (package:flutter/src/foundation/isolates.dart:93:12)
#5 _startIsolate. (dart:isolate/runtime/libisolate_patch.dart:282:17)
#6 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:165:12)

My flutter doctor

[✓] Flutter (Channel master, v0.3.6-pre.24, on Mac OS X 10.13.4 17E202, locale en-VN)
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 9.3)
[✓] Android Studio (version 3.1)
[✓] VS Code (version 1.22.2)
[✓] Connected devices (1 available)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions