super_dialog 0.2.0
super_dialog: ^0.2.0 copied to clipboard
A powerful, flexible, and beautifully animated dialog toolkit for Flutter. Create stunning dialogs with smooth slide, scale, and fade animations.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'screens/home_screen.dart';
import 'theme/app_theme.dart';
void main() {
runApp(const SuperDialogExampleApp());
}
class SuperDialogExampleApp extends StatefulWidget {
const SuperDialogExampleApp({super.key});
@override
State<SuperDialogExampleApp> createState() => _SuperDialogExampleAppState();
}
class _SuperDialogExampleAppState extends State<SuperDialogExampleApp> {
ThemeMode _themeMode = ThemeMode.light;
void _toggleTheme() {
setState(() {
_themeMode = _themeMode == ThemeMode.light
? ThemeMode.dark
: ThemeMode.light;
});
}
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Super Dialog Examples',
debugShowCheckedModeBanner: false,
themeMode: _themeMode,
theme: AppTheme.light,
darkTheme: AppTheme.dark,
home: HomeScreen(
onThemeToggle: _toggleTheme,
isDarkMode: _themeMode == ThemeMode.dark,
),
);
}
}