LogEntryOperation.fromJson constructor

LogEntryOperation.fromJson(
  1. Object? j
)

Implementation

factory LogEntryOperation.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return LogEntryOperation(
    id: switch (json['id']) {
      null => '',
      Object $1 => decodeString($1),
    },
    producer: switch (json['producer']) {
      null => '',
      Object $1 => decodeString($1),
    },
    first: switch (json['first']) {
      null => false,
      Object $1 => decodeBool($1),
    },
    last: switch (json['last']) {
      null => false,
      Object $1 => decodeBool($1),
    },
  );
}