app_loader.dart 886 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. import 'package:animate_do/animate_do.dart';
  2. import 'package:flutter/material.dart';
  3. class AppLoader extends StatelessWidget {
  4. final String? text;
  5. const AppLoader({super.key, this.text});
  6. bool isEmpty(viewmodel) {
  7. return viewmodel == null;
  8. }
  9. @override
  10. Widget build(BuildContext context) {
  11. return Center(
  12. child: SizedBox(
  13. child: Center(
  14. child: Column(
  15. mainAxisAlignment: MainAxisAlignment.center,
  16. children: [
  17. const SizedBox(
  18. height: 70,
  19. ),
  20. Bounce(
  21. infinite: true,
  22. child: Image.asset('assets/edesarrollos_icon_logo.png'),
  23. ),
  24. Text(
  25. text ?? "Cargando",
  26. style: const TextStyle(fontSize: 25),
  27. ),
  28. ],
  29. ),
  30. ),
  31. ),
  32. );
  33. }
  34. }