create static method

MainWebApp create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "mainWebApp",
  3. String special_return_type = "mainWebApp",
  4. String? url,
  5. WebAppOpenMode? mode,
})
override

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

Implementation

static MainWebApp create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "mainWebApp",
  String special_return_type = "mainWebApp",
  String? url,
  WebAppOpenMode? mode,
}) {
  // MainWebApp mainWebApp = MainWebApp({
  final Map mainWebApp_data_create_json = {
    "@type": special_type,
    "@return_type": special_return_type,
    "url": url,
    "mode": (mode != null) ? mode.toJson() : null,
  };

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

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