loading_widget.dart 666 B

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