搜索插件、代码仓与 APP 分类

插件详情v1.0.4

fancy_dialog

自定义弹出对话框,灵感来自 Android 的 FancyGifDialog,新功能是您可以选择两种主题:Fancy 和 Flat,并且可以从您的资源中加载图片和 GIF。

近 30 天下载
52
喜欢数
35
Pub 分数
20

安装插件

flutter pub add fancy_dialog

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

FancyDialog 是一个 Flutter 包,提供受 Android 上的 FancyGifDialog 启发的可自定义警报对话框。它支持两种主题——Fancy 和 Flat,并允许用户从本地资源加载图片和 GIF。非常适合通过视觉上吸引人的弹出窗口来增强应用 UI,无需复杂设置即可简化动画和样式对话框的集成。该包轻量级且专为移动应用中需要引人注目的用户反馈而设计。

适合场景

  • 显示带有动画效果的自定义警报
  • 显示图像或GIF格式的通知
  • 提升用户入门体验
  • 创建主题确认对话框
  • 改进应用程序中的视觉反馈

主要特点

  • 两种主题选项:华丽和扁平
  • 支持来自资源的静态图像和 GIF
  • 用于快速集成的简单 API
  • 可自定义的对话框外观
  • 轻量且快速的渲染

适合对象

  • 寻求吸引人的对话框的移动应用开发者
  • 需要动画或主题警报的项目
  • 专注于用户体验和参与度的应用程序
  • 使用 Flutter 开发 Android 和 iOS 的开发者
  • UI 设计师想要灵活的对话框组件

使用建议

  • 需要在 pubspec.yaml 中正确配置资源
  • 仅限针对移动平台的 Flutter 应用
  • GIF 支持取决于 flutter_gif 包
  • 使用大型资源时可能会增加打包大小
  • 主题自定义需要对Flutter样式设置有基本了解

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Fancy Flutter Alert Dialog

Hits

Build Status Coverage Status GitHub release (latest by date)

GitHub stars Twitter Follow

Pure Dart and Flutter package for Android,IOS and Web

A flutter Package to show custom alert Dialog,you can choose between two themes 'Fancy' and 'Flat'

The package is available in fancy_dialog

Usage

Import the Package

add this dependencies to your app dependencies: fancy_dialog: ^1.0.4

Use the Package

add this import statement import 'package:fancy_dialog/fancy_dialog.dart';

to show a Basic Dialog

showDialog(
              context: context,
              builder: (BuildContext context) => FancyDialog(
                title: "Fancy Gif Dialog",
                descreption: "This is descreption for fancy gif,you can load any image or gif to be displayed :), and you can choose between two themes Fancy and Flat",
                )
            ) 
          

the title and descreption are required and the rest of the parameters are :

  • okFun : the function to be called when the user press Ok button (positive button)

  • cancelFun : the function to be called when the user press cancel button (negative button)

  • cancelColor : the color of the negative button, by default it's Colors.grey

  • oklColor : the color of the positive button, by default it's Colors.pink

  • ok : the text of the positive button, by default it's 'OK !'

  • cancel : the text of the negative button, by default it's 'cancel'

  • animationType : The type of the animation, there are 4 types,which are :

    • FancyAnimation.LEFT_RIGHT the default one
    • FancyAnimation.RIGHT_LEFT
    • FancyAnimation.TOP_BOTTOM
    • FancyAnimation.BOTTOM_TOP
  • gifpath : the path for the image or the GIF to be displayed,or you can choose between 6 Gifs the package provides :

    • FancyGif.MOVE_FORWARD the default one
    • FancyGif.CHECK_MAIL
    • FancyGif.FUNNY_MAN
    • FancyGif.PLAY_MEDIA
    • FancyGif.SUBMIT
    • FancyGif.SHARE
  • theme : Fancy or Flat

    • FancyTheme.FANCY
    • FancyTheme.FLAT

The dialog will be dissmised by default when the user click Ok or cancel, DON'T ADD Navigator.of(context).pop() to okFun or cancelFun

ScreenShots

Contribution

Feel free to contribute,report a bug or to suggest a feature

Thank you :)

所属分类

源码仓库

使用此插件的项目

暂无相关数据。