delay method

AnimatedWidgetBuilder delay(
  1. dynamic delayValue
)

Animation delay Accepts Duration, DurationShorthand, or String (e.g., ".500ms", ".5s", ".5m")

Implementation

AnimatedWidgetBuilder delay(dynamic delayValue) {
  Duration delay;
  if (delayValue is Duration) {
    delay = delayValue;
  } else if (delayValue is DurationShorthand) {
    delay = delayValue.duration;
  } else if (delayValue is String) {
    delay = DurationShorthand.parse(delayValue).duration;
  } else {
    throw ArgumentError('delay must be Duration, DurationShorthand, or String');
  }
  return _copyWith(config: config.copyWith(delay: delay));
}