excellent_loading 0.0.7 excellent_loading: ^0.0.7 copied to clipboard
This package is use to show loading with awesome animation and it is only for use in my workplace. This package is just publish for testing.
import 'package:excellent_loading/excellent_loading.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
void main() {
runApp(const MyApp());
ExcellentLoading.instance
..color = Colors.green
..loadingType = LoadingType.inTop;
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return const GetMaterialApp(
home: Home(),
);
}
}
class Home extends StatelessWidget {
const Home({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: TextButton(
onPressed: () {
ExcellentLoading.show(context,
onDissmiss: () {
debugPrint('object');
});
Future.delayed(const Duration(seconds: 3), () {
ExcellentLoading.dismiss();
});
},
child: const Text('Show'))),
);
}
}