FLUTTER ECOSYSTEM

riccardoratta/platform_alert_dialog

適用於目前平台的 Flutter 外掛程式,用於建立提示對話方塊。

platform_alert_dialog 專案封面
Stars
5
Forks
5
最近推送(UTC)
2020年9月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