alert_dialog 0.1.0
alert_dialog: ^0.1.0

Flutter Android iOS web

Alert Dialog Widget JS-LIKE for Flutter. Use alert dialog easy and simple for your flutter app.

Alert Dialog #

pub package

Alert Dialog Widget for Flutter(JS-LIKE). https://pub.dev/packages/alert_dialog

Installation #

Add pubspec.yaml #

dependencies:
  alert_dialog: lastest_version

Usage #

Basic #

import 'package:flutter/material.dart';

import 'package:alert_dialog/alert_dialog.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Welcome to Flutter',
      home: Scaffold(
        appBar: AppBar(
          title: Text('Welcome to Flutter'),
        ),
        body: Center(
          child: FlatButton(
            child: Text('Alert Dialog'),
            onPressed: () {
              return alert(context, title: Text('Alert'));
            },
          ),
        ),
      ),
    );
  }
}

Custom Message #

import 'package:flutter/material.dart';

import 'package:alert_dialog/alert_dialog.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Welcome to Flutter',
      home: Scaffold(
        appBar: AppBar(
          title: Text('Welcome to Flutter'),
        ),
        body: Center(
          child: FlatButton(
            child: Text('Alert Dialog'),
            onPressed: () {
              return alert(
                context,
                title: Text('Alert'),
                content: Text('It is fun!'),
                textOK: Text('Yes'),
              );
            },
          ),
        ),
      ),
    );
  }
}

Recommend Libraries #

Maintainer #

License #

MIT

0
likes
100
pub points
75%
popularity

Alert Dialog Widget JS-LIKE for Flutter. Use alert dialog easy and simple for your flutter app.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

jehunseem@gmail.com

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on alert_dialog