A new flutter package project which contains lots of beautiful alert dialog that will help you lot to create beautiful awesome alert box very quickly and easily.

Related tags

Templates flutter
Overview

flutter_awesome_alert_box

A new flutter package project which contains lots of beautiful alert dialog that will help you lot to create beautiful awesome alert box very quickly and easily.

Show some ❀️ and star the repo to support the project

Details Screenshot Code
Diffrent alert boxes
Simple Alert Box SimpleAlertBox(context: context);
Info Alert Box InfoAlertBox(context: context);
Success Alert Box SuccessAlertBox(context: context);
Warning Alert Box WarningAlertBox(context: context);
Danger Alert Box DangerAlertBox(context: context);
Dark Alert Box DarkAlertBox(context: context);
Simple Alert Box Center SimpleAlertBoxCenter(context: context);
Info Alert Box Center InfoAlertBoxCenter(context: context);
Success Alert Box Center SuccessAlertBoxCenter(context: context);
Warning Alert Box Center WarningAlertBoxCenter(context: context);
Danger Alert Box Center DangerAlertBoxCenter(context: context);
Dark Alert Box Center DarkAlertBoxCenter(context: context);
Confirm Box ConfirmAlertBox(context: context);
Confirm Box Dark ConfirmAlertBoxDark(context: context);
Delete Alert Box DeleteAlertBox(context: context);
Success Backgroung Alert Box SuccessBgAlertBox(context: context);
Info Backgroung Alert Box InfoBgAlertBox(context: context);
Warning Backgroung Alert Box WarningBgAlertBox(context: context);
Danger Backgroung Alert Box DangerBgAlertBox(context: context);
Dark Backgroung Alert Box DarkBgAlertBox(context: context);
Simple Backgroung Alert Box SimpleBgAlertBox(context: context);
Custom Backgroung Alert Box CustomBgAlertBox(context: context);

Alert Box Options For SimpleAlertBox,InfoAlertBox,DangerAlert,SuccessAlert,WarningAlert,DarkAlertBox, :

title: [title] used for alert_box title by default its "Your alert title comes here"
icon: [icon] used for  alert_box title Icon
messageText: [messageText] used from main message of alert box by default its "Alert Message Here"
titleTextColor: [titleTextColor] used for  both title Text and Icon color
messageColor: [messageColor] used for main message text color
buttonColor: [buttonColor] used for button background color
buttonTextColor: [buttonTextColor] used for button text color by default its white
buttonText: [buttonText] used for button text value by default its "Yes"

Alert Box Options For DeleteAlertBox:

title: [title] used for alert_box title by default its "Your alert title comes here"
icon: [icon] used for  alert_box title Icon by default its Info icon
messageText: [messageText] used from main message of alert box by default its "Alert Message Here"
titleTextColor: [titleTextColor] used for  both title Text and Icon color by default its black
messageColor: [messageColor] used for main message text color by default its black
buttonColorForYes: [buttonColorForYes] used for button background color by default its Green
buttonTextColorForYes: [buttonTextColorForYes] used for button text color by default its white
buttonTextForYes: [buttonTextForYes] used for button text value by default its "Yes"
buttonColorForNo: [buttonColorForNo] used for button background color by default its Red
buttonTextColorForNo: [buttonTextColorForNo] used for button text color by default its white
buttonTextForNo: [buttonTextForNo] used for button text value by default its "No"
onPressedYes: [onPressedYes] is a function that will call when onpressed Yes button
onPressedNo: [onPressedNo] is a function that will call when onpressed No button

Example Code

[ Center(child: Text("Simple Alert Box")), Wrap( children: [ Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () { SimpleAlertBox(context: context); }, color: Colors.purple, child: Text( "Simple", style: TextStyle(color: Colors.white), ), ), ), Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () { InfoAlertBox(context: context); }, color: Colors.blue, child: Text( "Info", style: TextStyle(color: Colors.white), ), ), ), Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () { SuccessAlertBox(context: context); }, color: Colors.green, child: Text( "Success", style: TextStyle(color: Colors.white), ), ), ), Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () { DangerAlertBox(context: context); }, color: Colors.red, child: Text( "Danger", style: TextStyle(color: Colors.white), ), ), ), Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () { WarningAlertBox(context: context); }, color: Colors.orange, child: Text( "Warning", style: TextStyle(color: Colors.white), ), ), ), Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () { DarkAlertBox(context: context); }, color: Colors.black, child: Text( "Dark", style: TextStyle(color: Colors.white), ), ), ) ], ), Center(child: Text("CenterIcon Alert Box")), Wrap( children: [ Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () { InfoAlertBoxCenter(context: context); }, color: Colors.blue, child: Text( "Info Center", style: TextStyle(color: Colors.white), ), ), ), Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () { SimpleAlertBoxCenter(context: context); }, color: Colors.blue, child: Text( "Simple Center", style: TextStyle(color: Colors.white), ), ), ), Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () { SuccessAlertBoxCenter(context: context); }, color: Colors.green, child: Text( "Suceess Center", style: TextStyle(color: Colors.white), ), ), ), Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () { DangerAlertBoxCenter(context: context); }, color: Colors.red, child: Text( "Danger Center", style: TextStyle(color: Colors.white), ), ), ), Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () { WarningAlertBoxCenter(context: context); }, color: Colors.orange, child: Text( "Warning Center", style: TextStyle(color: Colors.white), ), ), ), Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () { DarkAlertBoxCenter(context: context); }, color: Colors.black, child: Text( "Dark Center", style: TextStyle(color: Colors.white), ), ), ), ], ), SizedBox( height: 20, child: Center(child: Text("Confirm Alert Box")), ), Wrap( children: [ Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () { ConfirmAlertBox(context: context); }, color: Colors.blue, child: Text( "Confirm Box", style: TextStyle(color: Colors.white), ), ), ), Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () { ConfirmAlertBoxDark(context: context); }, color: Colors.black, child: Text( "Confirm Box Dark", style: TextStyle(color: Colors.white), ), ), ), Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () { DeleteAlertBox(context: context); }, color: Colors.red, child: Text( "Delete Alert", style: TextStyle(color: Colors.white), ), ), ), Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () { SuccessBgAlertBox(context: context); }, color: Colors.green, child: Text( "Success BG Alert", style: TextStyle(color: Colors.white), ), ), ), Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () { DangerBgAlertBox(context: context); }, color: Colors.red, child: Text( "Delete BG Alert", style: TextStyle(color: Colors.white), ), ), ), Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () { WarningBgAlertBox(context: context); }, color: Colors.orange, child: Text( "Warning BG Alert", style: TextStyle(color: Colors.white), ), ), ), Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () { InfoBgAlertBox(context: context); }, color: Colors.blue, child: Text( "Info BG Alert", style: TextStyle(color: Colors.white), ), ), ), Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () { DarkBgAlertBox(context: context); }, color: Colors.black, child: Text( "Dark BG Box", style: TextStyle(color: Colors.white), ), ), ), Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () { SimpleBgAlertBox(context: context); }, color: Colors.blueAccent, child: Text( "Simple BG Box", style: TextStyle(color: Colors.white), ), ), ), Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () { CustomBgAlertBox(context: context); }, color: Colors.deepOrange, child: Text( "Custom BG Box", style: TextStyle(color: Colors.white), ), ), ) ], ) ], ), ); } } ">
import 'package:flutter/material.dart';
import 'package:flutter_awesome_alert_box/flutter_awesome_alert_box.dart';

class HomePage extends StatefulWidget {
  @override
  _HomePageState createState() => _HomePageState();
}

class _HomePageState extends State
      
      
       
        {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("flutter_awesome_alert_box"),
        centerTitle: true,
        leading: Padding(
          padding: const EdgeInsets.all(8.0),
          child: FlutterLogo(),
        ),
      ),
      body: ListView(
        children: 
       
       
        
        [
          Center(child: Text("Simple Alert Box")),
          Wrap(
            children: 
        
        
         
         [
              Padding(
                padding: const EdgeInsets.all(8.0),
                child: FlatButton(
                  onPressed: () {
                    SimpleAlertBox(context: context);
                  },
                  color: Colors.purple,
                  child: Text(
                    "Simple",
                    style: TextStyle(color: Colors.white),
                  ),
                ),
              ),
              Padding(
                padding: const EdgeInsets.all(8.0),
                child: FlatButton(
                  onPressed: () {
                    InfoAlertBox(context: context);
                  },
                  color: Colors.blue,
                  child: Text(
                    "Info",
                    style: TextStyle(color: Colors.white),
                  ),
                ),
              ),
              Padding(
                padding: const EdgeInsets.all(8.0),
                child: FlatButton(
                  onPressed: () {
                    SuccessAlertBox(context: context);
                  },
                  color: Colors.green,
                  child: Text(
                    "Success",
                    style: TextStyle(color: Colors.white),
                  ),
                ),
              ),
              Padding(
                padding: const EdgeInsets.all(8.0),
                child: FlatButton(
                  onPressed: () {
                    DangerAlertBox(context: context);
                  },
                  color: Colors.red,
                  child: Text(
                    "Danger",
                    style: TextStyle(color: Colors.white),
                  ),
                ),
              ),
              Padding(
                padding: const EdgeInsets.all(8.0),
                child: FlatButton(
                  onPressed: () {
                    WarningAlertBox(context: context);
                  },
                  color: Colors.orange,
                  child: Text(
                    "Warning",
                    style: TextStyle(color: Colors.white),
                  ),
                ),
              ),
              Padding(
                padding: const EdgeInsets.all(8.0),
                child: FlatButton(
                  onPressed: () {
                    DarkAlertBox(context: context);
                  },
                  color: Colors.black,
                  child: Text(
                    "Dark",
                    style: TextStyle(color: Colors.white),
                  ),
                ),
              )
            ],
          ),
          Center(child: Text("CenterIcon Alert Box")),
          Wrap(
            children: 
         
         
          
          [
              Padding(
                padding: const EdgeInsets.all(8.0),
                child: FlatButton(
                  onPressed: () {
                    InfoAlertBoxCenter(context: context);
                  },
                  color: Colors.blue,
                  child: Text(
                    "Info Center",
                    style: TextStyle(color: Colors.white),
                  ),
                ),
              ),
              Padding(
                padding: const EdgeInsets.all(8.0),
                child: FlatButton(
                  onPressed: () {
                    SimpleAlertBoxCenter(context: context);
                  },
                  color: Colors.blue,
                  child: Text(
                    "Simple Center",
                    style: TextStyle(color: Colors.white),
                  ),
                ),
              ),
              Padding(
                padding: const EdgeInsets.all(8.0),
                child: FlatButton(
                  onPressed: () {
                    SuccessAlertBoxCenter(context: context);
                  },
                  color: Colors.green,
                  child: Text(
                    "Suceess Center",
                    style: TextStyle(color: Colors.white),
                  ),
                ),
              ),
              Padding(
                padding: const EdgeInsets.all(8.0),
                child: FlatButton(
                  onPressed: () {
                    DangerAlertBoxCenter(context: context);
                  },
                  color: Colors.red,
                  child: Text(
                    "Danger Center",
                    style: TextStyle(color: Colors.white),
                  ),
                ),
              ),
              Padding(
                padding: const EdgeInsets.all(8.0),
                child: FlatButton(
                  onPressed: () {
                    WarningAlertBoxCenter(context: context);
                  },
                  color: Colors.orange,
                  child: Text(
                    "Warning Center",
                    style: TextStyle(color: Colors.white),
                  ),
                ),
              ),
              Padding(
                padding: const EdgeInsets.all(8.0),
                child: FlatButton(
                  onPressed: () {
                    DarkAlertBoxCenter(context: context);
                  },
                  color: Colors.black,
                  child: Text(
                    "Dark Center",
                    style: TextStyle(color: Colors.white),
                  ),
                ),
              ),
            ],
          ),
          SizedBox(
            height: 20,
            child: Center(child: Text("Confirm Alert Box")),
          ),
          Wrap(
            children: 
          
          
            [ Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () { ConfirmAlertBox(context: context); }, color: Colors.blue, child: Text( "Confirm Box", style: TextStyle(color: Colors.white), ), ), ), Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () { ConfirmAlertBoxDark(context: context); }, color: Colors.black, child: Text( "Confirm Box Dark", style: TextStyle(color: Colors.white), ), ), ), Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () { DeleteAlertBox(context: context); }, color: Colors.red, child: Text( "Delete Alert", style: TextStyle(color: Colors.white), ), ), ), Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () { SuccessBgAlertBox(context: context); }, color: Colors.green, child: Text( "Success BG Alert", style: TextStyle(color: Colors.white), ), ), ), Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () { DangerBgAlertBox(context: context); }, color: Colors.red, child: Text( "Delete BG Alert", style: TextStyle(color: Colors.white), ), ), ), Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () { WarningBgAlertBox(context: context); }, color: Colors.orange, child: Text( "Warning BG Alert", style: TextStyle(color: Colors.white), ), ), ), Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () { InfoBgAlertBox(context: context); }, color: Colors.blue, child: Text( "Info BG Alert", style: TextStyle(color: Colors.white), ), ), ), Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () { DarkBgAlertBox(context: context); }, color: Colors.black, child: Text( "Dark BG Box", style: TextStyle(color: Colors.white), ), ), ), Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () { SimpleBgAlertBox(context: context); }, color: Colors.blueAccent, child: Text( "Simple BG Box", style: TextStyle(color: Colors.white), ), ), ), Padding( padding: const EdgeInsets.all(8.0), child: FlatButton( onPressed: () { CustomBgAlertBox(context: context); }, color: Colors.deepOrange, child: Text( "Custom BG Box", style: TextStyle(color: Colors.white), ), ), ) ], ) ], ), ); } } 
          
         
         
        
        
       
       
      
      
You might also like...

A Very Good Flutter Federated Plugin created by the Very Good Ventures Team πŸ¦„

A Very Good Flutter Federated Plugin created by the Very Good Ventures Team πŸ¦„

Very Good Flutter Plugin Developed with πŸ’™ by Very Good Ventures πŸ¦„ A Very Good Flutter Plugin created by the Very Good Ventures Team. Getting Started

Oct 19, 2022

A Very Good Dart CLI Template created by the Very Good Ventures Team πŸ¦„

A Very Good Dart CLI Template created by the Very Good Ventures Team πŸ¦„

Very Good Dart CLI Developed with πŸ’™ by Very Good Ventures πŸ¦„ A Dart CLI template created by the Very Good Ventures Team. Generated by the Very Good C

Dec 15, 2022

A flutter package which will help you to create a draggable widget that can be dragged around the screen.

A flutter package which will help you to create a draggable widget that can be dragged around the screen.

A flutter package which will help you to create a draggable widget that can be dragged around the screen. Demo Features πŸ’š Manually Control the positi

Aug 10, 2022

Chance Dart is a free Open Source project that lets you create random strings, integers, and other things to help with tiresome tasks, especially when building automated tests or wherever else you require anything random.

 Chance Dart is a free Open Source project that lets you create random strings, integers, and other things to help with tiresome tasks, especially when building automated tests or wherever else you require anything random.

Chance Dart Random generator helper for Dart Homepage β€’ Documentation Overview Chance Dart is a free Open Source project that lets you create random s

Dec 27, 2022

Awesome aurora gradient - Awesome Aurora Gradients for flutter

Awesome aurora gradient - Awesome Aurora Gradients for flutter

Awesome Aurora Gradient Provides a simple but powerful gradient extension method

Feb 25, 2022

Awesome Notifications add-on plugin to enable push notifications through Firebase Cloud Messaging with all awesome notifications features.

Awesome Notifications add-on plugin to enable push notifications through Firebase Cloud Messaging with all awesome notifications features.

Awesome Notifications FCM Awesome Notifications add-on to send push notifications using FCM (Firebase Cloud Messaging), with all awesome notifications

Jan 4, 2023

Responsive-Ui-builder - The responsive ui builder package contains widgets that helps you to create your UI responsive

Responsive-Ui-builder - The responsive ui builder package contains widgets that helps you to create your UI responsive

Responsive Ui Builder Getting Started The responsive ui builder package contains

Feb 1, 2022

Localize your flutter application quickly and easily.

EzLocalization This package allows you to setup a powerful localization system with ease and in only a few minutes. Features Here are some features: E

Sep 22, 2022
Comments
  • Icon(Data) doesn't work/display

    Icon(Data) doesn't work/display

    CustomBgAlertBox( context: context, title: "Your height is:", icon: Icons.height, bgColor: secondColor, buttonColor: firstColor, buttonTextColor: secondColor, messageTextColor: fifthColor, titleTextColor: fifthColor );

    The Icon is not displaying in the desired position.

    opened by bit-burger 4
  • fixed all routines that ingored their icon parameter to use it if it …

    fixed all routines that ingored their icon parameter to use it if it …

    …is provided.

    added Future [result] member variable to all dialogs that present button choices so callers have the option of to 'await DialogObject.result' to get the result sent to pop(). added default result to all pop() calls for dialogs that have more than one button (the button text is sent by default as the result). added pop() calls to all dialogs default [onPressedYes] functions so that the 'Yes' buttons dismiss the dialog by default

    Several of the dialogs ignored their [icon] parameters if they were provided, this has been fixed. I have also added a 'result' Future member to the dialogs that have a yes and no button. This allows the creator/caller of the dialog object to subsequently do something like: var confirmAB = ConfirmAlertBox(onPressedYes: () { Navigator.pop(context, "DELETE"); }, onPressedNo: () { Navigator.pop(context, "CANCEL"); },); String result = await confirmAB.result; if( result=="DELETE" ) { ... }

    (basically use the alert boxes like regular showDialog() calls.) This change has no effect for any use that is not using it. All previous behavior is identical (although the icon parameters are no longer ingored, but that would not be expected behavior)

    Thanks!

    opened by timmaffett 0
  • Alertboxes incompatible with Cupertino apps or Tab Views?

    Alertboxes incompatible with Cupertino apps or Tab Views?

    I am trying to use the package's alert boxes inside a CupertinoApp, where I use CupertinoTabViews to create a "classic" iOS app.

    However, when calling an AlertBox through an onPressed, the debug console returns

    The ancestors of this widget were CupertinoPageScaffold dependencies: [MediaQuery] state: _CupertinoPageScaffoldState#49b30 CupertinoTabView state: _CupertinoTabViewState#69ec6 CupertinoTabScaffold dependencies: [_InheritedCupertinoTheme, CupertinoUserInterfaceLevel, MediaQuery] state: _CupertinoTabScaffoldState#eb2a2 MainNavView state: _MainNavViewState#bcd3a CupertinoApp state: _CupertinoAppState#d3e74 CupertinoImageApp ...

    And nothing visible happens on screen. Maybe it's just an implementation error on my part, but the error message sounds suspicous ...

    opened by herrmayr 1
Owner
Karan Soni
Application Developer
Karan Soni
Show beautiful bottom sheet as confirmation dialog quickly and easily.

sweetsheet Show beautiful bottom sheet as confirmation dialog quickly and easily. nice warning success danger and since version 0.2.0 , it is fully cu

Ayao Corneille ALLOGBALO 80 Sep 27, 2022
Adaptive dialog - Show alert dialog or modal action sheet adaptively according to platform.

adaptive_dialog Show alert dialog or modal action sheet adaptively according to platform. showOkAlertDialog Convenient wrapper of showAlertDialog. iOS

Masayuki Ono (mono) 244 Dec 17, 2022
This package will help you to manage the overlays in your projects. Show a dialog, notification, window, or a panel easily

This package will help you to manage the overlays in your projects. Show a dialog, notification, window, or a panel easily. or use one of the helping widgets like AutoComplete, Expander(Dropdown).

Schaban Bochi 25 Dec 4, 2022
A small splashscreen used as intro for flutter applications easily with a lot of customizations ❀️πŸ₯³

Splash Screen A splashscreen package to be used for an intro for any flutter application easily with a lot of customization Currently Supported by awe

DPLYR 283 Dec 30, 2022
A dart package which provides a lot of helpers functions for easy development.

more_functions A dart package which provides a lot of helpers functions for easy development. Installation Add this to your packages pubspec.yaml file

Talat El Beick 0 Dec 5, 2021
A Very Good Flutter Package Template created by the Very Good Ventures Team πŸ¦„

Very Good Flutter Package Developed with ?? by Very Good Ventures ?? A Very Good Flutter package created by Very Good Ventures ?? . Getting Started ??

Very Good Open Source 32 Dec 13, 2022
A Very Good Dart Package Template created by the Very Good Ventures Team πŸ¦„

Very Good Dart Package Developed with ?? by Very Good Ventures ?? A Very Good Dart package created by Very Good Ventures ?? . Getting Started ?? Insta

Very Good Open Source 8 Aug 14, 2022
A wrapper on top of alert dialog provided by flutter.

material_dialog A wrapper on top of alert dialog provided by flutter. Demo Use this package as a library 1. Depend on it Add this to your package's pu

Zubair Rehman 28 Aug 8, 2022
This is a Flutter app which shows how to add a Fitted Box in you App

fittedbox A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if thi

Shehzaan Mansuri 1 Oct 25, 2021
A simple screen that is shown when your app gets crashed instead of the normal crash dialog. It's very similar to the one in Flutter.

Red Screen Of Death What A simple screen that is shown when your app gets crashed instead of the normal crash dialog. It's very similar to the one in

Ahmad Melegy 178 Dec 9, 2022