call method
Implementation
@override
Object call(Interpreter interpreter, List<Object?> arguments,
Map<Symbol, Object?> namedArguments) {
int days = 0;
var daysParsed = namedArguments[const Symbol('days')];
if (daysParsed != null) {
days = daysParsed as int;
}
int hours = 0;
var hoursParsed = namedArguments[const Symbol('hours')];
if (hoursParsed != null) {
hours = hoursParsed as int;
}
int minutes = 0;
var minutesParsed = namedArguments[const Symbol('minutes')];
if (minutesParsed != null) {
minutes = minutesParsed as int;
}
int seconds = 0;
var secondsParsed = namedArguments[const Symbol('seconds')];
if (secondsParsed != null) {
seconds = secondsParsed as int;
}
int milliseconds = 0;
var millisecondsParsed = namedArguments[const Symbol('milliseconds')];
if (millisecondsParsed != null) {
milliseconds = millisecondsParsed as int;
}
int microseconds = 0;
var microsecondsParsed = namedArguments[const Symbol('microseconds')];
if (microsecondsParsed != null) {
microseconds = microsecondsParsed as int;
}
return Duration(
days: days,
hours: hours,
minutes: minutes,
seconds: seconds,
milliseconds: milliseconds,
microseconds: microseconds);
}