FLUTTER ECOSYSTEM

riccardoratta/platform_alert_dialog

現在のプラットフォームに適応したアラートダイアログを構築するためのFlutterプラグイン。

platform_alert_dialog のプロジェクト画像
Stars
5
Forks
5
最終プッシュ(UTC)
2020/09/29
プロジェクト状態
アーカイブ済み
Riccardo Ratta GitHub avatar
GITHUB User

Riccardo Ratta ↗

Italy
言語DartObjective-CJava

このリポジトリが公開するパッケージ

使用している依存関係

依存関係一覧 2 件
  • flutter{"sdk":"flutter"}
  • flutter_test開発用{"sdk":"flutter"}

元の README

以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。

README を開く / 閉じる

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();
          },
        ),
      ],
    );
  },
);
Example
Screenshot with theme Android Screenshot with theme iOs
https://raw.githubusercontent.com/riccardoratta/platform_alert_dialog/HEAD/screenshots/alert-android.png https://raw.githubusercontent.com/riccardoratta/platform_alert_dialog/HEAD/screenshots/alert-ios.png