Skip to content
A simple Flutter AlertDialog.
Dart
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
.gitignore
.metadata
CHANGELOG.md
LICENSE
README.md
pubspec.lock
pubspec.yaml

README.md

flutter_alertdialog

pub package

A Flutter package for easy implementation of a custom alert dialog.

Add depedency

dependencies:
     flutter_alertdialog:

Easy to use

import 'package:flutter_alertdialog/flutter_alertdialog.dart';
void main() => runApp(FlutterApp());
class FlutterApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: new Scaffold(
        appBar: new AppBar(
          centerTitle: true,
          title: new Text(
            'Flutter AlertDialog'
          ),
        ),
        body: new Center(
          child: new FlatButton(
            child: new Text(
              'Press to see the magic.'
            ),
            onPressed: () {
              showAlertDialog(context);
            },
          ),
        ),
      ),
    );
  }
}
showAlertDialog(BuildContext context) {
  showDialog(
      context: context,
      barrierDismissible: true,
      builder: (BuildContext context) {
        return new FlutterAlertDialog();
      }
  );
}
You can’t perform that action at this time.