Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

fancy flutter alert dialog

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.1

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

alert dialog

2_flat

3

4_flat


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

Comments are closed.