create static method

Platforms create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "platforms",
  3. Object? android,
  4. Object? ios,
  5. Object? linux,
  6. Object? macos,
  7. Object? web,
  8. Object? windows,
})
override

return original data json

Implementation

static Platforms create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "platforms",
  Object? android,
  Object? ios,
  Object? linux,
  Object? macos,
  Object? web,
  Object? windows,
}) {
  // Platforms platforms = Platforms({
  final Map platforms_data_create_json = {
    "@type": special_type,
    "android": android,
    "ios": ios,
    "linux": linux,
    "macos": macos,
    "web": web,
    "windows": windows,
  };

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

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