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

パッケージ詳細v1.0.0

sk_alert_dialog

Flutter用に高度にカスタマイズ可能で、強力かつ使いやすいアラートダイアログです。

30日間ダウンロード
14
いいね数
23
Pub ポイント
40

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

flutter pub add sk_alert_dialog

パッケージ概要

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

sk_alert_dialog は、Flutter用に設計された、カスタマイズ性が高く使いやすいアラートダイアログウィジェットです。柔軟なスタイルと直感的な設定により、ユーザーとのインタラクションを強化します。最小限のセットアップで応答性があり、視覚的に魅力的なダイアログを作成するための強力なAPIを提供します。通知、確認、プロンプトの表示に最適で、カスタムコンテンツ、ボタン、アニメーションをサポートしています。パッケージは軽量であり、既存のFlutterプロジェクトにスムーズに統合できます。オープンソースの性質により、コミュニティの貢献と透明性が促進されています。

用途

  • 確認ダイアログの表示
  • ユーザー通知の表示
  • フォームを介してユーザー入力を収集する
  • アプリレベルのアラートの処理
  • ダイアログの外観のカスタマイズ
  • オンボーディングメッセージの実装

主な機能

  • 高度カスタマイズ可能なデザイン
  • Flutter との簡単な統合
  • カスタムコンテンツとボタンをサポートしています
  • 軽量でパフォーマンスに優れる
  • オープンソースで活発な開発中
  • レスポンシブレイアウトのサポート

適している対象

  • 再利用可能なダイアログコンポーネントを探している開発者
  • 複数のプラットフォーム間で一貫したUIを必要とするプロジェクト
  • ブランド化されたアラート体験を必要とするアプリ
  • 開発生産性を最優先するチーム
  • フロントエンド中心のFlutterアプリケーション
  • 迅速なUIインタラクションのプロトタイピング

注意事項

  • 制限されたプラットフォーム固有の振る舞いカスタマイズ
  • 組み込みのローカリゼーションサポートなし
  • アクセシビリティ機能の手動処理が必要です
  • 複雑なレイアウトには追加のスタイリングが必要になる場合があります
  • 非常に大きなダイアログコンテンツには最適化されていません
  • 高度な機能には外部の依存関係に依存しています

元の README

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

SKAlertDialog

  A highly customizable, powerful and easy-to-use alert dialog for Flutter.   Flutter pub package

GIF

Screenshots

SKAlertDialog Basic Alert Alert with buttons Alert with custom buttons
Login Form Checkbox Radio button Custom Dialog

💻 Installation

You just need to add sk_alert_dialog as a dependency in your pubspec.yaml file.

dependencies:
sk_alert_dialog: ^1.0.0

Usage

Import this class
import 'package:sk_alert_dialog/sk_alert_dialog.dart';

Simple Alert

     SKAlertDialog.show(
        context: context,
        type: SKAlertType.info,
        title: 'Simple Alert',
        message: 'Hi! Welcome to SKALertDialog',
        onOkBtnTap: (value) {
          print('Okay Button Tapped');
        },
      );

Alert with buttons

    SKAlertDialog.show(
        context: context,
        type: SKAlertType.buttons,
        title: 'Alert with buttons',
        message: 'Shall we move to next alert?',
        onOkBtnTap: (value) {
          print('Okay Button Tapped');
        },
        onCancelBtnTap: (value) {
          print('Cancel Button Tapped');
        },
      );

Alert with custom buttons

   SKAlertDialog.show(
        context: context,
        type: SKAlertType.buttons,
        title: 'Alert with custom buttons',
        message: 'Do you like this package?',
        okBtnText: 'YES',
        okBtnTxtColor: Colors.white,
        okBtnColor: const Color(0xFF3BD459),
        cancelBtnText: 'NO',
        cancelBtnTxtColor: Colors.white,
        cancelBtnColor: const Color(0xFFFF4954),
        onOkBtnTap: (value) {
          print('Okay Button Tapped');
        },
        onCancelBtnTap: (value) {
          print('Cancel Button Tapped');
        },
      );

Login Form

  SKAlertDialog.show(
        context: context,
        type: SKAlertType.loginform,
        title: 'Login Form',
        okBtnText: 'LOGIN',
        onOkBtnTap: (value) {
          print('Okay Button Tapped');
        },
        onCancelBtnTap: (value) {
          print('Cancel Button Tapped');
        },
        onEmailTextFieldChanged: (value) {
          print('On Email Text Changed $value');
        },
        onPasswordTextFieldChanged: (value) {
          print('On Password Text Changed $value');
        },
      );

Checkbox

    SKAlertDialog.show(
        context: context,
        type: SKAlertType.checkbox,
        checkBoxAry: {'Choice One': true, 'Choice Two': false, 'Choice Three': true, 'Choice Four': false, 'Choice Five': false},
        title: 'Checkbox',
        onCancelBtnTap: (value) {
          print('Cancel Button Tapped');
        },
        onCheckBoxSelection: (value) {
          print('onCheckBoxSelection $value');
        },
      );

Radio button

    SKAlertDialog.show(
        context: context,
        type: SKAlertType.radiobutton,
        radioButtonAry: {'Choice One': 1, 'Choice Two': 2, 'Choice Three': 3, 'Choice Four': 4, 'Choice Five': 5},
        title: UtilsImporter().stringUtils.radio_button_alert_title,
        onCancelBtnTap: (value) {
          print('Cancel Button Tapped');
        },
        onRadioButtonSelection: (value) {
          print('onRadioButtonSelection $value');
        },
      );

Custom Dialog

    SKAlertDialog.show(
        context: context,
        type: SKAlertType.custom,
        customWidget: customWidget(),
      );
Create the custom widget
  Widget customWidget() { 
     return new Padding(
        padding: EdgeInsets.only(left: 20, right: 20, top: 20, bottom: 20),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: <Widget>[
            Text(
              'Thank you for reviewing the package',
              style: TextStyle(
                  fontWeight: FontWeight.w400,
                  color: Theme.of(context).primaryColorDark.withOpacity(0.7),
                  fontSize: 20),
            ),
            SizedBox(height: 20),
            Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children: <Widget>[
                FlatButton(
                  color: const Color(0xFF50A1FF),
                  onPressed: () {
                    Navigator.of(context).pop();
                  },
                  child: Text(
                    'The End !',
                    style: TextStyle(
                        fontWeight: FontWeight.w700,
                        color: Colors.white,
                        fontSize: 20),
                  ),
                )
              ],
            ),
          ],
        ));
  }

カテゴリー

依存関係

依存関係一覧 1 件

ソースリポジトリ

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

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