Json.fromList constructor Null safety

Json.fromList(
  1. List list
)

Create Json from a List

Implementation

Json.fromList(List<dynamic> list) {
  _rawValue = <dynamic>[];

  try {
    int i = 0;
    for (var item in list) {
      _set(i++, item);
    }
  } on JsonException catch (error) {
    exception = exception ?? error;
  }
}