LogSplit.fromJson constructor

LogSplit.fromJson(
  1. Object? j
)

Implementation

factory LogSplit.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return LogSplit(
    uid: switch (json['uid']) {
      null => '',
      Object $1 => decodeString($1),
    },
    index: switch (json['index']) {
      null => 0,
      Object $1 => decodeInt($1),
    },
    totalSplits: switch (json['totalSplits']) {
      null => 0,
      Object $1 => decodeInt($1),
    },
  );
}