jolleekin / jsonx

An extended JSON library that supports the encoding and decoding of arbitrary objects.
BSD 2-Clause "Simplified" License
11 stars 6 forks source link

NoSuchMethodError: No constructor '_GrowableList' with matching arguments declared in class 'List'. #17

Open cbiqih opened 7 years ago

cbiqih commented 7 years ago

class Examination { int id; int index; String title; List<Option> options; }

class Option { int id; int index; String sequence; String content; }

`Unhandled exception: NoSuchMethodError: No constructor '_GrowableList' with matching arguments declared in class 'List'. Receiver: Type: class '_GrowableList@0150898' Tried calling: new _GrowableList() Found: new _GrowableList(int)

0 NoSuchMethodError._throwNew (dart:core-patch/errors_patch.dart:196)

1 _LocalClassMirror._invokeConstructor (dart:mirrors-patch/mirrors_impl.dart:916)

2 _LocalClassMirror.newInstance (dart:mirrors-patch/mirrors_impl.dart:842)

3 _jsonToObject (package:jsonx/jsonx.dart:321:14)

4 decode (package:jsonx/jsonx.dart:184:10)

5 ExaminationJson.getInstance (file:///Users/lightwave/DartProjects/PersonalityColorTest/lib/module/ExaminationJson.dart:26:45)

#6 main (file:///Users/lightwave/DartProjects/PersonalityColorTest/lib/module/ExaminationJson.dart:11:62) #7 _startIsolate. (dart:isolate-patch/isolate_patch.dart:265) #8 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:151)`