tryFromJson<T extends SerializableMixin, U> static method

List<T>? tryFromJson<T extends SerializableMixin, U>(
  1. Iterable? json,
  2. T decode(
    1. U
    )
)

Creates a list of Serializable objects from json.

Returns null if json is ommited.

Implementation

static List<T>? tryFromJson<T extends SerializableMixin, U>(
  final Iterable? json,
  T Function(U) decode,
) => json != null ? fromJson(json, decode) : null;