OperationsScopedList.fromJson constructor

OperationsScopedList.fromJson(
  1. Object? j
)

Implementation

factory OperationsScopedList.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return OperationsScopedList(
    operations: switch (json['operations']) {
      null => [],
      List<Object?> $1 => [for (final i in $1) Operation.fromJson(i)],
      _ => throw const FormatException('"operations" is not a list'),
    },
    warning: switch (json['warning']) {
      null => null,
      Object $1 => Warning.fromJson($1),
    },
  );
}