fromMap static method

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

Construct from Map.

Implementation

static DeviceToken? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  switch (_) {
    case 'deviceTokenFirebaseCloudMessaging':
      return DeviceTokenFirebaseCloudMessaging.fromMap(_map);
    case 'deviceTokenHuaweiPush':
      return DeviceTokenHuaweiPush.fromMap(_map);
    case 'deviceTokenMicrosoftPush':
      return DeviceTokenMicrosoftPush.fromMap(_map);
    case 'deviceTokenWebPush':
      return DeviceTokenWebPush.fromMap(_map);
    case 'deviceTokenTizenPush':
      return DeviceTokenTizenPush.fromMap(_map);
    case 'deviceTokenMicrosoftPushVoIP':
      return DeviceTokenMicrosoftPushVoIP.fromMap(_map);
    case 'deviceTokenApplePush':
      return DeviceTokenApplePush.fromMap(_map);
    case 'deviceTokenSimplePush':
      return DeviceTokenSimplePush.fromMap(_map);
    case 'deviceTokenUbuntuPush':
      return DeviceTokenUbuntuPush.fromMap(_map);
    case 'deviceTokenApplePushVoIP':
      return DeviceTokenApplePushVoIP.fromMap(_map);
    case 'deviceTokenWindowsPush':
      return DeviceTokenWindowsPush.fromMap(_map);
    case 'deviceTokenBlackBerryPush':
      return DeviceTokenBlackBerryPush.fromMap(_map);
    case null:
    default:
      return null;
  }
}