cool_alert

A Flutter package to display animated alert dialogs

Usage

To use this package, add cool_alert as a dependency in your pubspec.yaml file. And add this import to your file.

import 'package:cool_alert/cool_alert.dart';

Image

Screenshot  Gif

Example

CoolAlert.show(
   context: context,
   type: CoolAlertType.success,
   text: "Your transaction was successful!",
);

CoolAlert Class

AttributeData typeDescriptionDefault Value
contextBuildContext@requiredNull
typeCoolAlertType@required - Type of alert dialog, ex: CoolAlertType.success for success dialogsNull
titleStringSet a custom title for dialogBased on the CoolAlertType selected
textStringSet the description text of the dialog.Null
confirmBtnTextStringText of confirm button'Ok'
confirmBtnTapFunctionFunction that handle click of confirm button() => Navigator.pop(context)
confirmBtnColorColorColor of confirm ButtonTheme.of(context).primaryColor
cancelBtnTextStringText of cancel button'Cancel'
cancelBtnTapFunctionFunction that handle click of cancel button() => Navigator.pop(context)
barrierDismissibleboolDissmiss dialog on touch overlaytrue
animTypeCoolAlertAnimTypeType of dialogue enter animationCoolAlertAnimType.scale

Libraries

cool_alert