durationIndicatorBuilder method
This is used in video asset item in the picker, in order to display the duration of the video or audio type of asset. 该字段用在选择器视频或音频部件上,用于显示视频或音频资源的时长。
Implementation
String durationIndicatorBuilder(Duration duration) {
const String separator = ':';
final String minute = duration.inMinutes.toString().padLeft(2, '0');
final String second = (duration - Duration(minutes: duration.inMinutes))
.inSeconds
.toString()
.padLeft(2, '0');
return '$minute$separator$second';
}