Skip to main content

awesome_custom_dialog 2.0.0 copy "awesome_custom_dialog: ^2.0.0" to clipboard
awesome_custom_dialog: ^2.0.0 copied to clipboard

Chainable Flutter dialogs, toasts and snackbars, plus PIN/OTP, dropdown, autocomplete, switch, rating, stepper, loader and motion widgets in Material, Cupertino or adaptive style.

example/lib/main.dart

library;

import 'package:awesome_custom_dialog/awesome_custom_dialog.dart';
import 'package:material_ui/material_ui.dart';

import 'app_settings.dart';
import 'home_screen.dart';
import 'theme/app_theme.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return ListenableBuilder(
      listenable: appSettings,
      builder: (context, _) {
        final TargetPlatform? platform = platformNotifier.value;
        // One scope above the app: a widget's own `design:` still wins.
        return ACDDesignScope(
          design: designNotifier.value,
          child: MaterialApp(
            debugShowCheckedModeBanner: false,
            title: 'ACD',
            theme: AppTheme.light().copyWith(platform: platform),
            darkTheme: AppTheme.dark().copyWith(platform: platform),
            themeMode: themeModeNotifier.value,
            // Gives toasts their own dedicated Overlay, independent of this
            // app's Navigator — see ACDToastLayer's doc comment for why that
            // matters (it's optional; .toast()/.snackbar() work without it
            // too, falling back to the nearest ambient Overlay).
            builder: (context, child) {
              Widget app = ACDToastLayer(child: child!);
              if (reduceMotionNotifier.value) {
                app = MediaQuery(
                  data: MediaQuery.of(context)
                      .copyWith(disableAnimations: true),
                  child: app,
                );
              }
              return app;
            },
            home: const HomeScreen(),
          ),
        );
      },
    );
  }
}
1
likes
160
points
130
downloads

Documentation

API reference

Publisher

verified publishertherivanta.com

Weekly Downloads

Chainable Flutter dialogs, toasts and snackbars, plus PIN/OTP, dropdown, autocomplete, switch, rating, stepper, loader and motion widgets in Material, Cupertino or adaptive style.

Repository (GitHub)
View/report issues

Topics

#dialog #widget #form #animation #authentication

License

MIT (license)

Dependencies

cupertino_icons, cupertino_ui, flutter, material_ui

More

Packages that depend on awesome_custom_dialog