Pure Dart and Flutter package for Android,IOS and Web

Overview

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 :)

You might also like...

Flutter package: Easy and powerful internationalization using Dart extensions.

Flutter package: Easy and powerful internationalization using Dart extensions.

i18n_extension Non-boilerplate Translation and Internationalization (i18n) for Flutter Start with a widget with some text in it: Text("Hello, how are

Dec 29, 2022

Package ANAlysis for Dart

A library for analyzing Dart packages. It invokes executables from the Dart SDK (or from the Flutter SDK if the package uses Flutter). Reports are cre

Dec 30, 2022

A collection of pixel-perfect iOS-styled components and properties for Flutter, following the official guidelines.

cupertinew ⚠️ Experimental and work in progress ⚠️ A collection of pixel-perfect iOS-styled components and properties for Flutter, following the offic

Nov 10, 2022

Cupertino_lists - an implementation of iOS-style lists (grouped and inset grouped).

Cupertino_lists - an implementation of iOS-style lists (grouped and inset grouped).

cupertino_lists cupertino_lists is an implementation of iOS-style lists (grouped and inset grouped). Warning: This package probably will not be mainta

Nov 3, 2022

pull_down_button is a rework of Flutter's PopupMenuButton to be styled like Pop-Up & Pull-Down Buttons from iOS 14+ with some additional customisation options.

pull_down_button is a rework of Flutter's PopupMenuButton to be styled like Pop-Up & Pull-Down Buttons from iOS 14+ with some additional customisation options.

pull_down_button is a rework of Flutter's PopupMenuButton to be styled like Pop-Up & Pull-Down Buttons from iOS 14+ with some additional customisation options.

Dec 30, 2022

A flutter grouped list widget similar to the iOS UITableview method name.

A flutter grouped list widget similar to the iOS UITableview method name.

group_tablelist A flutter grouped list widget similar to the iOS UITableview method name. Group tablelist package for Flutter. Features iOS tableview-

Aug 17, 2022

iOS-like proof of concept reorderable list with animations

iOS-like proof of concept reorderable list with animations

Reorderable List in Flutter iOS-like proof of concept reorderable list with animations Preview Getting Started See example/lib/main.dart for example u

Jan 2, 2023

Make your native android Dialog Fancy and Gify.

Make your native android Dialog Fancy and Gify.

Make your native android Dialog Fancy and Gify. A library that takes the standard Android Dialog to the next level with a variety of styling options and Gif's. Style your dialog from code.

Jan 2, 2023

May be used to intercept the Android back-button, as an alternative to `WillPopScope`.

back_button_interceptor In simple cases, when you need to intercept the Android back-button, you usually add WillPopScope to your widget tree. However

Dec 12, 2022
Comments
  • Height calculation error?

    Height calculation error?

    The following code is ok.

        showDialog(
            context: context,
            builder: (BuildContext context) => FancyDialog(
                  title: "Fancy Gif Dialog",
                  descreption: "确定删除这一项么?",
                ));
    

    image

    However If I change the title to Chinese characters like this, Then some errors occured.

        showDialog(
            context: context,
            builder: (BuildContext context) => FancyDialog(
                  title: "删除",
                  descreption: "确定删除这一项么?",
                ));
    

    image

    The following is the log of debug console.

    image

    
    ════════ Exception caught by rendering library ═════════════════════════════════
    The following assertion was thrown during layout:
    A RenderFlex overflowed by 5.6 pixels on the bottom.
    
    The relevant error-causing widget was
        FancyDialog 
    lib\pages\clue_fragment.dart:157
    The overflowing RenderFlex has an orientation of Axis.vertical.
    The edge of the RenderFlex that is overflowing has been marked in the rendering with a yellow and black striped pattern. This is usually caused by the contents being too big for the RenderFlex.
    
    Consider applying a flex factor (e.g. using an Expanded widget) to force the children of the RenderFlex to fit within the available space instead of being sized to their natural size.
    This is considered an error condition because it indicates that there is content that cannot be seen. If the content is legitimately bigger than the available space, consider clipping it with a ClipRect widget before putting it in the flex, or using a scrollable container rather than a Flex, like a ListView.
    
    The specific RenderFlex in question is: RenderFlex#c6c02 OVERFLOWING
    
    opened by liudonghua123 1
  • null-safety

    null-safety

    Upgraded the package to null safety. Added option for user to use custom buttons. [https://github.com/DokkarRachidReda/Fancy-Flutter-Alert-Dialog/issues/1](Issue 1)

    opened by Phelickz 0
  • No named parameter with the name 'nullOk'

    No named parameter with the name 'nullOk'

    Bonjour,

    j'avais l'erreur "No named parameter with the name 'nullOk'" et pour le corriger j'ai juste remplacé dans le fichier fancy_dialog.dart la ligne 139 par: assert(MediaQuery.of(context) != null,'\n**context does not contain media query object*\n');

    opened by samiaChayeb 1
  • the package don't support null safety

    the package don't support null safety

    Error: Cannot run with sound null safety, because the following dependencies don't support null safety:

    • package:fancy_dialog

    For solutions, see https://dart.dev/go/unsound-null-safety

    opened by LiuKaoji 0
Releases(v1.0.4)
Owner
Dokkar Rachid Reda
Computer Science student at ESI ex INI , android developer , Interested in Deep learning & machine learning
Dokkar Rachid Reda
A Flutter plugin that makes it easier to make floating/overlay windows for Android with pure Flutter

flutter_floatwing A Flutter plugin that makes it easier to make floating/overlay windows for Android with pure Flutter. Android only Features Pure Flu

Zoe 116 Dec 21, 2022
PlutoGrid is a dataGrid that can be controlled by the keyboard on desktop and web. Of course, it works well on Android and IOS.

PlutoGrid is a dataGrid that can be controlled by the keyboard on desktop and web.

Manki Kim 453 Jan 4, 2023
A dart package to display a horizontal bar of customisable toggle tabs. Supports iOS and Android.

toggle_bar A dart package to display a horizontal bar of customisable toggle tabs. Supports iOS and Android. Installation Depend on it. dependencies:

Prem Adithya 9 Jul 13, 2022
Math rendering and editing in pure Flutter.

Flutter Math Math equation rendering in pure Dart & Flutter. This project aims to achieve maximum compatibility and fidelity with regard to the KaTeX

null 109 Dec 16, 2022
A pure flutter toast library

oktoast A library for flutter. A pure dart toast Library. You can completely customize the style of toast. 中文博客介绍 Screenshot Default Custom GIF Versio

OpenFlutter 438 Dec 24, 2022
Flutter progress dialog. Support both Android and iOS platform.

Flutter Progress Dialog [pub packages] | Flutter progress dialog. Support both Android and iOS platform

Dylan Wu 22 Oct 9, 2022
PowerFileView - A powerful file view widget, support a variety of file types, such as Doc Eexcl PPT TXT PDF and so on, Android is implemented by Tencent X5, iOS is implemented by WKWebView.

PowerFileView - A powerful file view widget, support a variety of file types, such as Doc Eexcl PPT TXT PDF and so on, Android is implemented by Tencent X5, iOS is implemented by WKWebView.

Yao 8 Oct 22, 2022
A high performance Flutter Widget to render Bottts svg avatars on android/ios devices.

Flutter Avatars - Bottts A high performance Flutter Widget to render Bottts svg avatars on android/ios devices. (pub.dev) It's faster than other class

Abhijat Saxena 11 Dec 19, 2021
Flutter StatusBar Control for iOS & Android

Since flutter_statusbar_manager is no longer maintained, this package is a re-publish and will be occasionally updated for continued use in existing projects.

Rafael M. 9 Nov 15, 2022
Experimental solution for web-like text selection across widgets

Better Selection Experimental solution for web-like text selection across widgets (text, images, et cetera). Better selection is dependent on, and is

Wilson Wilson 59 Oct 12, 2022