LocalizedText.fromJson constructor

LocalizedText.fromJson(
  1. Object? j
)

Implementation

factory LocalizedText.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return LocalizedText(
    text: switch (json['text']) {
      null => '',
      Object $1 => decodeString($1),
    },
    languageCode: switch (json['languageCode']) {
      null => '',
      Object $1 => decodeString($1),
    },
  );
}