create static method

DeviceToken create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "deviceToken",
  3. bool special_is_json_scheme_class = true,
  4. String special_return_type = "deviceToken",
  5. DeviceTokenFirebaseCloudMessaging? device_token_firebase_cloud_messaging,
  6. DeviceTokenApplePush? device_token_apple_push,
  7. DeviceTokenApplePushVoIP? device_token_apple_push_vo_i_p,
  8. DeviceTokenWindowsPush? device_token_windows_push,
  9. DeviceTokenMicrosoftPush? device_token_microsoft_push,
  10. DeviceTokenMicrosoftPushVoIP? device_token_microsoft_push_vo_i_p,
  11. DeviceTokenWebPush? device_token_web_push,
  12. DeviceTokenSimplePush? device_token_simple_push,
  13. DeviceTokenUbuntuPush? device_token_ubuntu_push,
  14. DeviceTokenBlackBerryPush? device_token_black_berry_push,
  15. DeviceTokenTizenPush? device_token_tizen_push,
  16. DeviceTokenHuaweiPush? device_token_huawei_push,
})
override

Generate By AZKADEV | Azka Axelion Gibran Script Dont edit by hand or anything manual

Implementation

static DeviceToken create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "deviceToken",
  bool special_is_json_scheme_class = true,
  String special_return_type = "deviceToken",
  DeviceTokenFirebaseCloudMessaging? device_token_firebase_cloud_messaging,
  DeviceTokenApplePush? device_token_apple_push,
  DeviceTokenApplePushVoIP? device_token_apple_push_vo_i_p,
  DeviceTokenWindowsPush? device_token_windows_push,
  DeviceTokenMicrosoftPush? device_token_microsoft_push,
  DeviceTokenMicrosoftPushVoIP? device_token_microsoft_push_vo_i_p,
  DeviceTokenWebPush? device_token_web_push,
  DeviceTokenSimplePush? device_token_simple_push,
  DeviceTokenUbuntuPush? device_token_ubuntu_push,
  DeviceTokenBlackBerryPush? device_token_black_berry_push,
  DeviceTokenTizenPush? device_token_tizen_push,
  DeviceTokenHuaweiPush? device_token_huawei_push,
}) {
  // DeviceToken deviceToken = DeviceToken({
  final Map deviceToken_data_create_json = {
    "@type": special_type,
    "@is_json_scheme_class": special_is_json_scheme_class,
    "@return_type": special_return_type,
    "device_token_firebase_cloud_messaging": (device_token_firebase_cloud_messaging != null) ? device_token_firebase_cloud_messaging.toJson() : null,
    "device_token_apple_push": (device_token_apple_push != null) ? device_token_apple_push.toJson() : null,
    "device_token_apple_push_vo_i_p": (device_token_apple_push_vo_i_p != null) ? device_token_apple_push_vo_i_p.toJson() : null,
    "device_token_windows_push": (device_token_windows_push != null) ? device_token_windows_push.toJson() : null,
    "device_token_microsoft_push": (device_token_microsoft_push != null) ? device_token_microsoft_push.toJson() : null,
    "device_token_microsoft_push_vo_i_p": (device_token_microsoft_push_vo_i_p != null) ? device_token_microsoft_push_vo_i_p.toJson() : null,
    "device_token_web_push": (device_token_web_push != null) ? device_token_web_push.toJson() : null,
    "device_token_simple_push": (device_token_simple_push != null) ? device_token_simple_push.toJson() : null,
    "device_token_ubuntu_push": (device_token_ubuntu_push != null) ? device_token_ubuntu_push.toJson() : null,
    "device_token_black_berry_push": (device_token_black_berry_push != null) ? device_token_black_berry_push.toJson() : null,
    "device_token_tizen_push": (device_token_tizen_push != null) ? device_token_tizen_push.toJson() : null,
    "device_token_huawei_push": (device_token_huawei_push != null) ? device_token_huawei_push.toJson() : null,
  };

  deviceToken_data_create_json.removeWhere((key, value) => value == null);

  if (schemeUtilsIsSetDefaultData) {
    defaultData.forEach((key, value) {
      if (deviceToken_data_create_json.containsKey(key) == false) {
        deviceToken_data_create_json[key] = value;
      }
    });
  }
  return DeviceToken(deviceToken_data_create_json);
}