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();
}
);
}
Libraries
Dart
- dart:ffi
- Foreign Function Interface for interoperability with the C programming language. [...]
- dart:html
- HTML elements and other resources for web-based applications that need to interact with the browser and the DOM (Document Object Model). [...]
- dart:js
- Low-level support for interoperating with JavaScript. [...]
- dart:js_util
- Utility methods to efficiently manipulate typed JSInterop objects in cases where the name to call is not known at runtime. You should only use these methods when the same effect cannot be achieved with @JS annotations. These methods would be extension methods on JSObject if Dart supported extension methods.