flutter_alertdialog 0.0.7 flutter_alertdialog: ^0.0.7 copied to clipboard
A Flutter package for easy implementation of a custom alert dialog.
flutter_alertdialog #
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();
}
);
}