platform_alert_dialog 1.0.0+2 copy "platform_alert_dialog: ^1.0.0+2" to clipboard
platform_alert_dialog: ^1.0.0+2 copied to clipboard

Flutter plugin for build alert dialogs adapted to the current platform.

Platform Alert Dialog #

Flutter plugin for build alert dialogs adapted to the current platform.

showDialog<void>(
  context: context,
  builder: (BuildContext context) {
    return PlatformAlertDialog(
      title: Text('Rewind and remember'),
      content: SingleChildScrollView(
        child: ListBody(
          children: <Widget>[
            Text('You will never be satisfied.'),
            Text('You\’re like me. I’m never satisfied.'),
          ],
        ),
      ),
      actions: <Widget>[
        PlatformDialogAction(
          child: Text('Cancel'),
          onPressed: () {
            Navigator.of(context).pop();
          },
        ),
        PlatformDialogAction(
          child: Text('Regret'),
          actionType: ActionType.Preferred,
          onPressed: () {
            Navigator.of(context).pop();
          },
        ),
      ],
    );
  },
);
copied to clipboard

Example #

Screenshot with theme Android Screenshot with theme iOs
17
likes
40
points
7
downloads

Publisher

unverified uploader

Weekly Downloads

2024.09.16 - 2025.03.31

Flutter plugin for build alert dialogs adapted to the current platform.

Repository (GitHub)

License

BSD-2-Clause (license)

Dependencies

flutter

More

Packages that depend on platform_alert_dialog