adaptive_dialog 0.10.0+5
adaptive_dialog: ^0.10.0+5 copied to clipboard

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

adaptive_dialog #

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


showOkAlertDialog #

Convenient wrapper of showAlertDialog.

iOSAndroid
n1n2

showOkCancelAlertDialog #

Convenient wrapper of showAlertDialog.

iOSAndroid
n3n4
n5n6

showConfirmationDialog #

Show Confirmation Dialog. For Cupertino, fallback to ActionSheet.

iOSAndroid
n3n5

showModalActionSheet #

iOSAndroid
n7n8
n9n10
n11n12

showTextInputDialog #

iOSAndroid
n1n2
n3n4

showTextAnswerDialog #

Show text input dialog until answer is correct or cancelled. This is useful for preventing very destructive action is executed mistakenly.

iOSAndroid
n5n6

FAQ #

The getter modalBarrierDismissLabel was called on null #

adaptive_dialog uses Cupertino-style widgets internally on iOS, so GlobalCupertinoLocalizations.delegate is required under certain conditions.

import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';

class App extends StatelessWidget {
  const App({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      //...
      localizationsDelegates: const [
        GlobalMaterialLocalizations.delegate,
        GlobalWidgetsLocalizations.delegate,
        GlobalCupertinoLocalizations.delegate, // This is required
      ],
    );
  }
}

The input text color same with backgound when use CupertinoTextInputDialog #

This fixes the problem.

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart' hide Router;

class App extends StatelessWidget {
  const App({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      darkTheme: ThemeData(
        cupertinoOverrideTheme: const CupertinoThemeData(
          textTheme: CupertinoTextThemeData(), // This is required
        ),
      ),
    );
  }
}
304
likes
130
pub points
95%
popularity

Publisher

mono0926.com

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

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

animations, flutter, meta

More

Packages that depend on adaptive_dialog