fromMap static method

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

Construct from Map.

Implementation

static UpdateSuggestedActions? 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 added_actions = List<SuggestedAction>.from(
    (_map["added_actions"] ?? []).map(
      (e) => SuggestedAction.fromMap(e),
    ),
  );
  var removed_actions = List<SuggestedAction>.from(
    (_map["removed_actions"] ?? []).map(
      (e) => SuggestedAction.fromMap(e),
    ),
  );
  return UpdateSuggestedActions(
    extra: extra,
    clientId: clientId,
    added_actions: added_actions,
    removed_actions: removed_actions,
  );
}