Cursor.fromJson constructor

Cursor.fromJson(
  1. Object? j
)

Implementation

factory Cursor.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return Cursor(
    values: switch (json['values']) {
      null => [],
      List<Object?> $1 => [for (final i in $1) Value.fromJson(i)],
      _ => throw const FormatException('"values" is not a list'),
    },
    before: switch (json['before']) {
      null => false,
      Object $1 => decodeBool($1),
    },
  );
}