extendedDurationFromValidatedQuantity function

ExtendedDuration extendedDurationFromValidatedQuantity(
  1. ValidatedQuantity validatedQuantity
)

Implementation

ExtendedDuration extendedDurationFromValidatedQuantity(
  ValidatedQuantity validatedQuantity,
) =>
    ExtendedDuration(
      years: validatedQuantity.years?.toInt() ?? 0,
      months: validatedQuantity.months?.toInt() ?? 0,
      days: validatedQuantity.days?.toInt() ?? 0,
      hours: validatedQuantity.hours?.toInt() ?? 0,
      minutes: validatedQuantity.minutes?.toInt() ?? 0,
      seconds: validatedQuantity.seconds?.toInt() ?? 0,
      milliseconds: validatedQuantity.milliseconds?.toInt() ?? 0,
    );