create static method
Versions
create({
- bool schemeUtilsIsSetDefaultData = false,
- String? version,
- String? status,
- bool? hasdocumentation,
- String special_type = "versions",
- Pubspec? pubspec,
- String? archive_url,
- String? archive_sha256,
- String? published,
override
return original data json
Implementation
static Versions create({
bool schemeUtilsIsSetDefaultData = false,
String? version,
String? status,
bool? hasdocumentation,
String special_type = "versions",
Pubspec? pubspec,
String? archive_url,
String? archive_sha256,
String? published,
}) {
// Versions versions = Versions({
final Map versions_data_create_json = {
"version": version,
"status": status,
"hasDocumentation": hasdocumentation,
"@type": special_type,
"pubspec": (pubspec != null) ? pubspec.toJson() : null,
"archive_url": archive_url,
"archive_sha256": archive_sha256,
"published": published,
};
versions_data_create_json.removeWhere((key, value) => value == null);
if (schemeUtilsIsSetDefaultData) {
defaultData.forEach((key, value) {
if (versions_data_create_json.containsKey(key) == false) {
versions_data_create_json[key] = value;
}
});
}
return Versions(versions_data_create_json);
}