getAsDuration method

Duration getAsDuration(
  1. String key
)

Converts map element into a Duration or returns the current date if conversion is not possible.

  • key a key of element to get. Returns Duration value of the element or the current date if conversion is not supported.

See getAsDurationWithDefault

Implementation

Duration getAsDuration(String key) {
  return getAsDurationWithDefault(key, Duration());
}