giffy alert dialog
a beautiful and custom alert dialog for flutter highly inspired from fancyalertdialog-android.
the source code is 100% dart, and everything resides in the /lib folder.
�� installation
in the dependencies:
section of your pubspec.yaml
, add the following line:
dependencies:
giffy_dialog: <latest version>
❔ usage
import this class
import 'package:giffy_dialog/giffy_dialog.dart';
network giffy dialog
onpressed: () {
showdialog(
context: context,builder: (_) => networkgiffydialog(
imageurl:"https://raw.githubusercontent.com/shashank02051997/
fancygifdialog-android/master/gif's/gif14.gif",
title: text('granny eating chocolate',
textalign: textalign.center,
style: textstyle(
fontsize: 22.0,
fontweight: fontweight.w600)),
description:text('this is a granny eating chocolate dialog box.
this library helps you easily create fancy giffy dialog',
textalign: textalign.center,
),
onokbuttonpressed: () {},
) );
}
flare giffy dialog
onpressed: () {
showdialog(
context: context,builder: (_) => flaregiffydialog(
flarepath: 'assets/space_demo.flr',
flareanimation: 'loading',
title: text('space reloading',
style: textstyle(
fontsize: 22.0, fontweight: fontweight.w600),
),
description: text('this is a space reloading dialog box.
this library helps you easily create fancy flare dialog.',
textalign: textalign.center,
style: textstyle(),
),
onokbuttonpressed: () {},
) );
}
asset giffy dialog
onpressed: () {
showdialog(
context: context,builder: (_) => assetgiffydialog(
imagepath: 'assets/men_wearing_jacket.gif',
title: text('men wearing jackets',
style: textstyle(
fontsize: 22.0, fontweight: fontweight.w600),
),
description: text('this is a men wearing jackets dialog box.
this library helps you easily create fancy giffy dialog.',
textalign: textalign.center,
style: textstyle(),
),
onokbuttonpressed: () {},
) );
}
Comments are closed.