fromMap static method

ThemeSettings? fromMap(
  1. Map<String, dynamic>? _map
)
override

Construct from Map.

Implementation

static ThemeSettings? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  if (_ != CONSTRUCTOR) return null;
  var extra = _map['@extra'];
  var clientId = _map['@clientId'];
  var accent_color = _map['accent_color']! as int;
  var background = Background.fromMap(_map['background']);
  var outgoing_message_fill =
      BackgroundFill.fromMap(_map['outgoing_message_fill'])!;
  var animate_outgoing_message_fill =
      _map['animate_outgoing_message_fill']! as bool;
  var outgoing_message_accent_color =
      _map['outgoing_message_accent_color']! as int;
  return ThemeSettings(
    extra: extra,
    clientId: clientId,
    accent_color: accent_color,
    background: background,
    outgoing_message_fill: outgoing_message_fill,
    animate_outgoing_message_fill: animate_outgoing_message_fill,
    outgoing_message_accent_color: outgoing_message_accent_color,
  );
}