adaptive_dialog_manager 2.1.2 copy "adaptive_dialog_manager: ^2.1.2" to clipboard
adaptive_dialog_manager: ^2.1.2 copied to clipboard

A comprehensive Flutter adaptive dialog manager package that provides multi-platform dialog support with responsive design, accessibility features, and platform-specific behaviors.

example/lib/main.dart

import 'package:adaptive_dialog_manager/adaptive_dialog_manager.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

import 'pages/home_page.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  // Configure system UI
  SystemChrome.setSystemUIOverlayStyle(
    const SystemUiOverlayStyle(
      statusBarColor: Colors.transparent,
      statusBarIconBrightness: Brightness.dark,
      systemNavigationBarColor: Colors.transparent,
    ),
  );

  // Initialize the adaptive dialog manager
  AdaptiveDialogManager.initialize();

  // Initialize the adaptive snackbar manager
  AdaptiveSnackbarManager.initialize();

  runApp(const AdaptiveDialogExampleApp());
}

class AdaptiveDialogExampleApp extends StatefulWidget {
  const AdaptiveDialogExampleApp({super.key});

  @override
  State<AdaptiveDialogExampleApp> createState() =>
      _AdaptiveDialogExampleAppState();
}

class _AdaptiveDialogExampleAppState extends State<AdaptiveDialogExampleApp> {
  ThemeMode _themeMode = ThemeMode.system;

  void _toggleTheme() {
    setState(() {
      _themeMode = _themeMode == ThemeMode.light
          ? ThemeMode.dark
          : ThemeMode.light;
    });
  }

  @override
  Widget build(BuildContext context) {
    return ScreenUtilInit(
      designSize: const Size(375, 812),
      minTextAdapt: true,
      splitScreenMode: true,
      ensureScreenSize: true,
      builder: (BuildContext context, Widget? child) {
        return MaterialApp(
          title: 'Adaptive Dialog Manager Example',
          debugShowCheckedModeBanner: false,
          themeMode: _themeMode,

          // Home page
          home: HomePage(
            onThemeToggle: _toggleTheme,
            currentThemeMode: _themeMode,
          ),
          locale: const Locale('en', 'US'),
        );
      },
    );
  }
}
0
likes
160
points
310
downloads

Publisher

unverified uploader

Weekly Downloads

A comprehensive Flutter adaptive dialog manager package that provides multi-platform dialog support with responsive design, accessibility features, and platform-specific behaviors.

Repository (GitHub)
View/report issues

Topics

#adaptive-dialog #dialog-manager #dialog #snackbar #toast

Documentation

API reference

License

MIT (license)

Dependencies

equatable, flutter, flutter_shared_utilities, universal_io

More

Packages that depend on adaptive_dialog_manager