duration static method
Returns a Duration from the specified integer.
If it's not an integer, the default obtained from AnimationDefaults.durationOf is used (which is why a BuildContext is required).
Implementation
static Duration duration(DataSource source, List<Object> key, BuildContext context) {
final int? value = source.v<int>(key);
if (value == null) {
return AnimationDefaults.durationOf(context);
}
return Duration(milliseconds: value);
}