基础库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

17 lines
484 B

  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. }