基础组件库
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.
 
 
 
 
 

27 regels
785 B

  1. import 'package:shimmer/shimmer.dart';
  2. import 'package:flutter/material.dart';
  3. class CounponSkeleton extends StatelessWidget {
  4. @override
  5. Widget build(BuildContext context) {
  6. return Container(
  7. margin: const EdgeInsets.only(left: 12.5, right: 12.5, top: 12),
  8. width: double.infinity,
  9. height: 70,
  10. child: _shimmerWidget(width: double.infinity, height: 65, radius: 7.5),
  11. );
  12. }
  13. Widget _shimmerWidget({double width, double height, double radius = 0}) {
  14. return Shimmer.fromColors(
  15. baseColor: Colors.grey[300],
  16. highlightColor: Colors.grey[100],
  17. child: Container(
  18. width: width,
  19. height: height,
  20. decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(radius)),
  21. ),
  22. );
  23. }
  24. }