create static method
DurationDataScheme
create({
- bool schemeUtilsIsSetDefaultData = false,
- String special_type = "durationDataScheme",
- num? days,
- num? hours,
- num? minutes,
- num? seconds,
- num? milliseconds,
- num? microseconds,
override
return original data json
Implementation
static DurationDataScheme create({
bool schemeUtilsIsSetDefaultData = false,
String special_type = "durationDataScheme",
num? days,
num? hours,
num? minutes,
num? seconds,
num? milliseconds,
num? microseconds,
}) {
// DurationDataScheme durationDataScheme = DurationDataScheme({
final Map durationDataScheme_data_create_json = {
"@type": special_type,
"days": days,
"hours": hours,
"minutes": minutes,
"seconds": seconds,
"milliseconds": milliseconds,
"microseconds": microseconds,
};
durationDataScheme_data_create_json
.removeWhere((key, value) => value == null);
if (schemeUtilsIsSetDefaultData) {
defaultData.forEach((key, value) {
if (durationDataScheme_data_create_json.containsKey(key) == false) {
durationDataScheme_data_create_json[key] = value;
}
});
}
return DurationDataScheme(durationDataScheme_data_create_json);
}