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

41 lines
1.0 KiB

  1. import 'package:flutter/material.dart';
  2. import 'package:photo_manager/photo_manager.dart';
  3. abstract class LoadingDelegate {
  4. Widget buildBigImageLoading(
  5. BuildContext context, AssetEntity entity, Color themeColor);
  6. Widget buildPreviewLoading(
  7. BuildContext context, AssetEntity entity, Color themeColor);
  8. }
  9. class DefaultLoadingDelegate extends LoadingDelegate {
  10. @override
  11. Widget buildBigImageLoading(
  12. BuildContext context, AssetEntity entity, Color themeColor) {
  13. return Center(
  14. child: Container(
  15. width: 30.0,
  16. height: 30.0,
  17. child: CircularProgressIndicator(
  18. valueColor: AlwaysStoppedAnimation(themeColor),
  19. ),
  20. ),
  21. );
  22. }
  23. @override
  24. Widget buildPreviewLoading(
  25. BuildContext context, AssetEntity entity, Color themeColor) {
  26. return Center(
  27. child: Container(
  28. width: 30.0,
  29. height: 30.0,
  30. child: CircularProgressIndicator(
  31. valueColor: AlwaysStoppedAnimation(themeColor),
  32. ),
  33. ),
  34. );
  35. }
  36. }