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