mpwt_loading 0.0.8 mpwt_loading: ^0.0.8 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:awesome_snackbar_content/awesome_snackbar_content.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:mpwt_loading/mpwt_loading.dart';
void main() {
runApp(const MyApp());
}
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) {
MPWTLoading loading = Get.put(MPWTLoading(context));
return Scaffold(
body: Column(
children: [
TextButton(
onPressed: () {
loading.show();
},
child: const Text('Pleas show Loading')),
TextButton(onPressed: () {
loading.dissmiss();
}, child: const Text('Pleas hide Loading'))
],
),
);
}
}