搜索插件、代码仓与 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 !

所属分类

源码仓库

使用此插件的项目

暂无相关数据。