パッケージ、リポジトリ、アプリカテゴリを検索

art_sweetalert のカバー
パッケージ詳細v0.0.5

art_sweetalert

美しい、応答性があり、カスタマイズ可能でアクセスしやすいFlutterポップアップボックスの代替品。iOSおよびAndroidの両方をサポートしています。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
517
いいね数
54
Pub ポイント
140

パッケージをインストール

flutter pub add art_sweetalert

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

ArtSweetAlert は、Flutter 向けの視覚的に魅力的で応答性が高く、高度にカスタマイズ可能なダイアログパッケージであり、標準のポップアップダイアログの代替としてアクセシビリティが高く、使いやすい選択肢を提供します。Android、iOS、Web、macOS、Windows、Linux を含むすべての主要プラットフォームをサポートしており、デバイス間での一貫したユーザー体験を保証します。滑らかなアニメーションとモダンなデザインにより、アプリのインタラクティビティを向上させながらアクセシビリティ基準を維持します。スタイルのある警告、確認、通知の表示に最適です。

用途

  • アラートメッセージの表示
  • ユーザー確認ダイアログ
  • 読み込みインジケーター
  • 成功またはエラー通知
  • カスタマイズ可能なポップアップ

主な機能

  • 美しいアニメーション
  • クロスプラットフォーム対応
  • アクセシビリティ対応
  • 非常にカスタマイズ可能
  • 簡単な統合
  • レスポンシブデザイン

適している対象

  • 現代的なUIダイアログを必要とするアプリ
  • UXを重視する開発者
  • 一貫したクロスプラットフォーム動作を必要とするプロジェクト
  • 迅速な実装を希望するチーム
  • 複数のオペレーティングシステムをターゲットにするアプリ

注意事項

  • 複雑な使用ケースには追加のスタイリングが必要になる場合があります
  • ダイアログ形式のインタラクションに限定
  • 過剰使用によるパフォーマンスへの影響
  • 外部の依存関係に依存しています
  • ダイアログ以外のUIコンポーネントには適していません

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

art_sweetalert

A beautiful, responsive, customizable, accessible replacement, easy use for flutter popup boxes. Both supported ios and android.

A success message

ArtSweetAlert.show(
  context: context,
  artDialogArgs: ArtDialogArgs(
    type: ArtSweetAlertType.success,
    title: "A success message!",
    text: "Show a success message with an icon"
  )
);

A message with title and text

ArtSweetAlert.show(
    context: context,
    artDialogArgs: ArtDialogArgs(
        type: ArtSweetAlertType.question,
        title: "A question?",
        text: "Show a question message with an icon"
    )
);

An error message

ArtSweetAlert.show(
    context: context,
    artDialogArgs: ArtDialogArgs(
        type: ArtSweetAlertType.danger,
        title: "Oops...",
        text: "There is a problem :("
    )
);

A dialog with three buttons

ArtDialogResponse response = await ArtSweetAlert.show(
  barrierDismissible: false,
  context: context,
  artDialogArgs: ArtDialogArgs(
    showCancelBtn: true,
    denyButtonText: "Don't save",
    title: "Do you want to save the changes?",
    confirmButtonText: "Save",
  )
);

if(response==null) {
  return;
}

if(response.isTapConfirmButton) {
  ArtSweetAlert.show(
    context: context,
    artDialogArgs: ArtDialogArgs(
      type: ArtSweetAlertType.success,
      title: "Saved!"
    )
  );
  return;
}

if(response.isTapDenyButton) {
  ArtSweetAlert.show(
    context: context,
    artDialogArgs: ArtDialogArgs(
      type: ArtSweetAlertType.info,
      title: "Changes are not saved!"
    )
  );
  return;
}

A confirm dialog

ArtDialogResponse response = await ArtSweetAlert.show(
  barrierDismissible: false,
  context: context,
  artDialogArgs: ArtDialogArgs(
    denyButtonText: "Cancel",
    title: "Are you sure?",
    text: "You won't be able to revert this!",
    confirmButtonText: "Yes, delete it",
    type: ArtSweetAlertType.warning
  )
);

if(response==null) {
  return;
}

if(response.isTapConfirmButton) {
  ArtSweetAlert.show(
      context: context,
      artDialogArgs: ArtDialogArgs(
          type: ArtSweetAlertType.success,
          title: "Deleted!"
      )
  );
  return;
}


A message with a custom image



ArtSweetAlert.show(
    context: context,
    artDialogArgs: ArtDialogArgs(
        title: "Sweet!",
        text: "Modal with a custom image.",
        customColumns: [
          Container(
            margin: EdgeInsets.only(
                bottom: 12.0
            ),
            child: Image.network(
              "https://unsplash.it/400/200",
            ),

          )
        ]
    )
);


Submit your Github username!

ArtDialogResponse response = await ArtSweetAlert.show(
    artDialogKey: _artDialogKey,
    context: context,
    artDialogArgs: ArtDialogArgs(
        title: "Submit your Github username!",
        customColumns: [
            Container(
                margin: EdgeInsets.only( bottom: 20.0 ),
                child: CupertinoTextField(
                    controller: _textController,
                ),
            )
        ],
        onConfirm: () async  {
            _artDialogKey.currentState.showLoader();
            var response = await http.get(Uri.parse('https://api.github.com/users/'+_textController.text));
            if(response.statusCode!=200) {
                _artDialogKey.currentState.hideLoader();
                _artDialogKey.currentState.showErrors(["Request failed: Error"]);
                return;
            }
            var body = response.body;
            var bodyJson = json.decode(body);
            _artDialogKey.currentState.hideLoader();
            _artDialogKey.currentState.closeDialog( data: { "image": bodyJson["avatar_url"] } );
        },
        onDispose: () {
            _artDialogKey = GlobalKey<ArtDialogState>();
        },
    )
);

if (response == null) { return; }

if (response.isTapConfirmButton) {
    ArtSweetAlert.show(
        context: context,
        artDialogArgs: ArtDialogArgs(
            customColumns: [
                Container(
                    margin: EdgeInsets.only(bottom: 12.0),
                    child: Image.network( response.data["image"]),
                )
            ]
        )
    );
    return;
}


カテゴリー

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。