adaptive_dialog 2.3.0 copy "adaptive_dialog: ^2.3.0" to clipboard
adaptive_dialog: ^2.3.0 copied to clipboard

Show alert dialog or modal action sheet adaptively according to platform.

example/lib/main.dart

import 'package:adaptive_dialog/adaptive_dialog.dart';
import 'package:flutter/material.dart' hide Router;
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:flutter_web_plugins/url_strategy.dart';

import 'app.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  usePathUrlStrategy();
  AdaptiveDialog.instance.updateConfiguration(
    macOS: AdaptiveDialogMacOSConfiguration(
      applicationIcon: ClipRRect(
        borderRadius: BorderRadius.circular(16),
        child: _applicationIconImage,
      ),
    ),
  );
  runApp(
    Builder(
      builder: (context) {
        precacheImage(_applicationIconImage.image, context);
        return const ProviderScope(
          child: App(),
        );
      },
    ),
  );
}

final _applicationIconImage = Image.asset(
  'assets/images/love.png',
);
1.01k
likes
150
points
20.2k
downloads
screenshot

Publisher

verified publishermono0926.com

Weekly Downloads

Show alert dialog or modal action sheet adaptively according to platform.

Repository (GitHub)
View/report issues

Topics

#dialog #adaptive #alert #popup

Documentation

API reference

Funding

Consider supporting this project:

github.com

License

MIT (license)

Dependencies

animations, collection, dynamic_color, flutter, intersperse, macos_ui, meta

More

Packages that depend on adaptive_dialog