gifIndicator method

Widget gifIndicator(
  1. BuildContext context,
  2. Asset asset
)

GIF image type indicator. GIF 类型图片指示

Implementation

Widget gifIndicator(BuildContext context, Asset asset) {
  return PositionedDirectional(
    start: 0,
    bottom: 0,
    child: Container(
      padding: const EdgeInsets.all(6),
      decoration: BoxDecoration(
        gradient: LinearGradient(
          begin: AlignmentDirectional.bottomCenter,
          end: AlignmentDirectional.topCenter,
          colors: <Color>[theme.dividerColor, Colors.transparent],
        ),
      ),
      child: Container(
        padding: const EdgeInsets.symmetric(horizontal: 2, vertical: 1),
        decoration: !isAppleOS
            ? BoxDecoration(
                borderRadius: BorderRadius.circular(2),
                color: theme.iconTheme.color!.withOpacity(0.75),
              )
            : null,
        child: ScaleText(
          Constants.textDelegate.gifIndicator,
          style: TextStyle(
            color: isAppleOS
                ? theme.textTheme.bodyText2?.color
                : theme.primaryColor,
            fontSize: 13,
            fontWeight: FontWeight.w500,
          ),
          strutStyle: const StrutStyle(forceStrutHeight: true, height: 1),
        ),
      ),
    ),
  );
}