这是CaiYouHui前端,一个关于flutter的安卓app,前端使用flutter实现

loading_indicator.dart 596B

12345678910111213141516171819202122232425262728
  1. import 'package:flutter/material.dart';
  2. class LoadingIndicator extends StatelessWidget {
  3. final double size;
  4. final Color color;
  5. final double strokeWidth;
  6. const LoadingIndicator({
  7. super.key,
  8. this.size = 40,
  9. this.color = Colors.blue,
  10. this.strokeWidth = 3,
  11. });
  12. @override
  13. Widget build(BuildContext context) {
  14. return Center(
  15. child: SizedBox(
  16. width: size,
  17. height: size,
  18. child: CircularProgressIndicator(
  19. valueColor: AlwaysStoppedAnimation<Color>(color),
  20. strokeWidth: strokeWidth,
  21. ),
  22. ),
  23. );
  24. }
  25. }