NotificationSettingsScope.fromJson constructor

NotificationSettingsScope.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory NotificationSettingsScope.fromJson(Map<String, dynamic> json)  {
  switch(json["@type"]) {
    case NotificationSettingsScopePrivateChats.CONSTRUCTOR:
      return NotificationSettingsScopePrivateChats.fromJson(json);
    case NotificationSettingsScopeGroupChats.CONSTRUCTOR:
      return NotificationSettingsScopeGroupChats.fromJson(json);
    case NotificationSettingsScopeChannelChats.CONSTRUCTOR:
      return NotificationSettingsScopeChannelChats.fromJson(json);
    default:
      return const NotificationSettingsScope();
  }
}