搜尋套件、儲存庫與 APP 分類

panara_dialogs 封面
套件詳情v0.1.5

panara_dialogs

PanaraDialogs 是一個對話框 UI 工具包。為 Flutter 對話框提供簡約但美觀的設計。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
1290
喜歡數
184
Pub 分數
150

安裝套件

flutter pub add panara_dialogs

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

PanaraDialogs 是一個為 Flutter 設計的極簡且美觀的對話框 UI 套件,旨在透過乾淨現代的對話框元件提升使用者體驗。它在各平台提供一致且優雅的外觀,讓開發者能輕鬆實作美觀的對話框,無需進行大量自訂。該套件支援所有主要的 Flutter 平台,包括 Android、iOS、Web、macOS、Windows 和 Linux,確保廣泛的相容性。透過 pub 簡單整合,PanaraDialogs 為開發者提供符合當代設計原則的即用型對話框範本。

適用情境

  • 簡單警告對話方塊
  • 確認對話方塊
  • 可自定義的彈出模態框
  • 引導或教學疊加層
  • 用戶輸入收集

主要特色

  • 極簡且美觀的設計
  • 跨平台支援
  • 與 Flutter 的輕鬆整合
  • 預設計的對話方塊範本
  • 輕量且快速

適合對象

  • 尋求精緻對話方塊 UI 的開發者
  • 具有設計導向介面的專案
  • 需要一致對話框樣式的應用
  • 快速原型設計
  • UI/UX 優化

使用建議

  • 超出所提供主題的自訂功能有限
  • 最適合極簡設計風格
  • 可能需要額外的樣式設定以適應複雜版面
  • 不適合高度互動或動畫對話方塊

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Panara Dialogs

Pub Version GitHub

Panara Dialogs is a UI Kit for Dialog comes with 3 types of dialogs - Info Dialog, Confirmation Dialog both comes with 4 different variants as shown in below screenshots & Custom Dialog, with 7 different animations.

Preview

PanaraInfoDialog

successnormalwarningerror

PanaraConfirmDialog

successnormalwarningerror

Getting started

Add the dependency in pubspec.yaml:

dependencies:
  panara_dialogs: ^0.1.5

Usage

Then you just have to import the package with


import 'package:panara_dialogs/panara_dialogs.dart';

Here is how you can use PanaraInfoDialog in your flutter project.


PanaraInfoDialog.show(
    context,
    title: "Hello",
    message: "This is the PanaraInfoDialog",
    buttonText: "Okay",
    onTapDismiss: () {
        Navigator.pop(context);
    },
    panaraDialogType: PanaraDialogType.normal,
    barrierDismissible: false, // optional parameter (default is true)
);

Properties of PanaraInfoDialog
Property Type value
imagePath String path to your local assets image
title String any string value
message String any string value
buttonText String any string value
onTapDismiss void Function() function to decide what will happen onTap
panaraDialogType PanaraDialogType success, normal, warning, error, custom
color Color define your own color, by selecting panaraDialogType: PanaraDialogType.custom
textColor Color define your own text color
buttonTextColor Color define your own button text color
margin EdgeInsets define margin
padding EdgeInsets define padding
noImage bool If you don't want any image set it to true. it's false by default
barrierDismissible bool define if dialog is dismissible by tapping outside of dialog

And Here is how you can use PanaraConfirmDialog in your flutter project.


PanaraConfirmDialog.show(
    context,
    title: "Hello",
    message: "This is the PanaraConfirmDialog",
    confirmButtonText: "Confirm",
    cancelButtonText: "Cancel",
    onTapCancel: () {
        Navigator.pop(context);
    },
    onTapConfirm: () {
        Navigator.pop(context);
    },
    panaraDialogType: PanaraDialogType.normal,
    barrierDismissible: false, // optional parameter (default is true)
);

Properties of PanaraConfirmDialog
Property Type value
imagePath String path to your local assets image
title String any string value
message String any string value
confirmButtonText String any string value
cancelButtonText String any string value
onTapConfirm void Function() function to decide what will happen onTap confirm
onTapCancel void Function() function to decide what will happen onTap cancel
panaraDialogType PanaraDialogType success, normal, warning, error, custom
color Color define your own color, by selecting panaraDialogType: PanaraDialogType.custom
textColor Color define your own text color
buttonTextColor Color define your own button text color
margin EdgeInsets define margin
padding EdgeInsets define padding
noImage bool If you don't want any image set it to true. it's false by default
barrierDismissible bool define if dialog is dismissible by tapping outside of dialog

Here is how you can use PanaraCustomDialog in your flutter project.

PanaraCustomDialog.show(
    context,
    children: [
        Text(
            "Hello",
            style: TextStyle(
                fontSize: 20,
            ),
            textAlign: TextAlign.center,
        ),
        Text(
            "This is the PanaraCustomDialog",
            style: TextStyle(
                    fontSize: 16
                ),
            textAlign: TextAlign.center,
        ),
        // Add your own widgets here
    ],
    mainAxisAlignment: MainAxisAlignment.center,
    crossAxisAlignment: CrossAxisAlignment.center,
    backgroundColor: Colors.white,
    margin: EdgeInsets.all(20),
    padding: EdgeInsets.all(20),
    barrierDismissible: false, // optional parameter (default is true)
);
Properties of PanaraCustomDialog
Property Type value
children List<Widget> define your own widgets
mainAxisAlignment MainAxisAlignment start, center, end
crossAxisAlignment CrossAxisAlignment start, center, end
backgroundColor Color define background color
margin EdgeInsets define margin
padding EdgeInsets define padding
barrierDismissible bool define if dialog is dismissible by tapping outside of dialog
Animations for Both Dialogs

This are static methods for both Dialog Class.

method Animation
showAnimatedFromLeft() slide animation from left
showAnimatedFromRight() slide animation from right
showAnimatedFromTop() slide animation from top
showAnimatedFromBottom() slide animation from bottom
showAnimatedGrow() grow animation from center
showAnimatedShrink() shrink animation from center
showAnimatedFade() fade animation

Feedback

Please feel free to give me any feedback or file issue helping support this plugin !

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。