alert 2.0.1 alert: ^2.0.1 copied to clipboard
A Flutter plugin for showing native alert dialog in IOS and Toast messages in Android.
import 'package:flutter/material.dart';
import 'package:alert/alert.dart';
void main() => runApp(MyApp());
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: Center(
child: FlatButton(
color: Colors.blueAccent,
onPressed: () => Alert(message: 'Test').show(),
child: Text('Show Alert'),
),
),
),
);
}
}