audioIndicator method

  1. @override
Widget audioIndicator(
  1. BuildContext context,
  2. AssetEntity asset
)
override

Audio asset type indicator. 音频类型资源指示

Implementation

@override
Widget audioIndicator(BuildContext context, AssetEntity asset) {
  return Container(
    width: double.maxFinite,
    alignment: AlignmentDirectional.bottomStart,
    padding: const EdgeInsets.symmetric(horizontal: 2, vertical: 8),
    decoration: BoxDecoration(
      gradient: LinearGradient(
        begin: AlignmentDirectional.bottomCenter,
        end: AlignmentDirectional.topCenter,
        colors: <Color>[theme.dividerColor, Colors.transparent],
      ),
    ),
    child: Padding(
      padding: const EdgeInsetsDirectional.only(start: 4),
      child: ScaleText(
        textDelegate.durationIndicatorBuilder(
          Duration(seconds: asset.duration),
        ),
        style: const TextStyle(fontSize: 16),
        semanticsLabel: '${semanticsTextDelegate.sNameDurationLabel}: '
            '${semanticsTextDelegate.durationIndicatorBuilder(
          Duration(seconds: asset.duration),
        )}',
      ),
    ),
  );
}