loading_widget.dart 681 B

12345678910111213141516171819202122232425
  1. import 'package:flutter/material.dart';
  2. import 'package:photos/theme/ente_theme.dart';
  3. class EnteLoadingWidget extends StatelessWidget {
  4. final Color? color;
  5. final bool is20pts;
  6. const EnteLoadingWidget({this.is20pts = false, this.color, Key? key})
  7. : super(key: key);
  8. @override
  9. Widget build(BuildContext context) {
  10. return Center(
  11. child: Padding(
  12. padding: EdgeInsets.all(is20pts ? 3 : 5),
  13. child: SizedBox.fromSize(
  14. size: const Size.square(14),
  15. child: CircularProgressIndicator(
  16. strokeWidth: 2,
  17. color: color ?? getEnteColorScheme(context).strokeBase,
  18. ),
  19. ),
  20. ),
  21. );
  22. }
  23. }