confirm_dialog 1.0.0
confirm_dialog: ^1.0.0 copied to clipboard

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

example/main.dart

import 'package:flutter/material.dart';

import 'package:confirm_dialog/confirm_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: TextButton(
            child: Text('Confirm Dialog'),
            onPressed: () async {
              if (await confirm(context)) {
                return print('pressedOK');
              }
              return print('pressedCancel');
            },
          ),
        ),
      ),
    );
  }
}
6
likes
130
pub points
90%
popularity

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

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on confirm_dialog