基础库
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

shimmer_util.dart 484 B

12345678910111213141516
  1. import 'package:flutter/material.dart';
  2. import 'package:shimmer/shimmer.dart';
  3. class ShimmerUtil {
  4. static Widget getShimmerWidget({double width, double height, double radius = 0}) {
  5. return Shimmer.fromColors(
  6. baseColor: Colors.grey[300],
  7. highlightColor: Colors.grey[100],
  8. child: Container(
  9. width: width,
  10. height: height,
  11. decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(radius)),
  12. ),
  13. );
  14. }
  15. }