gifIndicator method
GIF image type indicator. GIF 类型图片指示
Implementation
Widget gifIndicator(BuildContext context, Asset asset) {
return Align(
alignment: Alignment.bottomCenter,
child: Container(
width: double.infinity,
padding: const EdgeInsets.all(6),
decoration: BoxDecoration(
gradient: LinearGradient(
begin: AlignmentDirectional.bottomCenter,
end: AlignmentDirectional.topCenter,
colors: <Color>[
theme.canvasColor.withAlpha(128),
Colors.transparent,
],
),
),
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 2, vertical: 1),
decoration: !isAppleOS(context)
? BoxDecoration(
borderRadius: BorderRadius.circular(2),
color: theme.iconTheme.color!.withOpacity(0.75),
)
: null,
child: ScaleText(
textDelegate.gifIndicator,
style: TextStyle(
color: theme.textTheme.bodyMedium?.color,
fontSize: 12,
fontWeight: FontWeight.bold,
),
semanticsLabel: semanticsTextDelegate.gifIndicator,
strutStyle: const StrutStyle(forceStrutHeight: true, height: 1),
),
),
),
);
}