搜尋套件、儲存庫與 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。非常適合透過視覺上吸引人的彈出視窗來增強應用程式介面,無需複雜設定即可簡化動畫與樣式對話方塊的整合。此套件輕量且專為需要引人注目的使用者回饋之移動應用程式設計。

適用情境

  • 顯示帶有動畫效果的自定義警示
  • 顯示圖像或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 :)

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。