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

GitHub リポジトリanwarsafy/xdialog

xdialog

anwarsafy/xdialog open-source repository details.

xdialog のプロジェクト画像
スター
1
フォーク
0
最終プッシュ(UTC)
2025/02/03
プロジェクト状態
公開中

元の README

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

XDialog - Flutter Custom Dialog Package

A feature-rich, highly customizable dialog package for Flutter applications.

🚀 Features

  • 🎨 Fully Customizable UI – Modify colors, fonts, and layouts.
  • ⚡ Smooth Animations – Built-in transitions for a better UX.
  • 🖱️ Hover Effects – Interactive UI elements.
  • 🌈 Multiple Button Support – Add as many actions as needed.
  • 🎚️ Size Customization – Adjust width, height, and padding.
  • 🕒 Animation Control – Customize animation duration & style.
  • 🎮 Interactive Examples – Ready-to-use examples for quick setup.

📦 Installation

Add the dependency in your pubspec.yaml:

dependencies:
  xdialog: ^1.0.0

Then, run:

flutter pub get

🎯 Usage

📝 Basic Dialog

To display a simple confirmation dialog:

import 'package:flutter/material.dart';
import 'package:xdialog/xdialog.dart';

void showBasicDialog(BuildContext context) {
  XDialog.show(
    context: context,
    title: const Text('Confirmation'),
    message: const Text('Are you sure?'),
    positiveButtonText: 'Yes',
    negativeButtonText: 'No',
  );
}

🖼️ Dialog with Image
import 'package:flutter/material.dart';
import 'package:xdialog/xdialog.dart';

void showImageDialog(BuildContext context) {
  XDialog.show(
    context: context,
    title: const Text('Image Preview'),
    message: const Text('This is an example with an image.'),
    image: Image.network('https://via.placeholder.com/150'),
    positiveButtonText: 'OK',
  );
}

Basic Confirmation Dialog

🎛️ Customization

Adjust Dialog Size
XDialog.show(
  context: context,
  title: const Text('Custom Size'),
  message: const Text('You can control the size.'),
  width: 300,
  height: 200,
);
Customize Button Styles
XDialog.show(
  context: context,
  title: const Text('Styled Buttons'),
  message: const Text('Different button styles.'),
  positiveButtonText: 'Confirm',
  negativeButtonText: 'Cancel',
  positiveButtonStyle: ElevatedButton.styleFrom(backgroundColor: Colors.green),
  negativeButtonStyle: TextButton.styleFrom(foregroundColor: Colors.red),
);

🔥 Roadmap

  • [ ] Add dark mode support.
  • [ ] Support for icon-based buttons.
  • [ ] More transition effects.

📜 License

This project is licensed under the MIT License.


💡 Contributing

Feel free to submit pull requests or open issues for suggestions and improvements.

Happy coding! 🚀

Anwar Safy GitHub avatar
GitHub 作者

Anwar Safy ↗

Passionate Flutter coder, building the future of mobile

@Alo-Information-TechnologySaudi Arabia
言語Dart

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

使用している依存関係

依存関係一覧 3 件

  • flutter{"sdk":"flutter"}
  • flutter_test開発用{"sdk":"flutter"}
  • flutter_lints開発用^2.0.0

プロジェクトに合うリポジトリを選ぶには?

用途で絞り込み、開発状況を比較し、採用前に元のリポジトリで要件を確認しましょう。

  1. 名前・作者・説明で検索し、技術トピックで絞り込みます。
  2. スター、フォーク、最近のプッシュを比較します。スターは関心の目安であり、品質の保証ではありません。
  3. 利用前に GitHub で README、ライセンス、Issues を確認します。

情報源と管理

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗