fromMap static method

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

Construct from Map.

Implementation

static AutosaveSettingsScope? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  switch (_) {
    case 'autosaveSettingsScopeGroupChats':
      return AutosaveSettingsScopeGroupChats.fromMap(_map);
    case 'autosaveSettingsScopeChannelChats':
      return AutosaveSettingsScopeChannelChats.fromMap(_map);
    case 'autosaveSettingsScopeChat':
      return AutosaveSettingsScopeChat.fromMap(_map);
    case 'autosaveSettingsScopePrivateChats':
      return AutosaveSettingsScopePrivateChats.fromMap(_map);
    case null:
    default:
      return null;
  }
}