dim_loading_dialog 0.0.1 dim_loading_dialog: ^0.0.1 copied to clipboard
Dim Loading Dialog simple use for popup dialog and custom popup with loading or progress dialog, check the example for use and look screenshot for ex result.
import 'package:dim_loading_dialog_example/home.dart';
import 'package:flutter/material.dart';
import 'package:dim_loading_dialog/dim_loading_dialog.dart';
class GlobalVariable {
/// This global key is used in material app for navigation through firebase notifications.
/// [navState] usage can be found in [notification_notifier.dart] file.
static final GlobalKey<NavigatorState> navState = GlobalKey<NavigatorState>();
}
void main() {
WidgetsFlutterBinding.ensureInitialized();
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
navigatorKey: GlobalVariable.navState,
home: const HomePage(),
theme: ThemeData(
// We set Poppins as our default font
// textTheme: GoogleFonts.poppinsTextTheme(Theme.of(context).textTheme),
primaryColor: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
),
);
}
}