reusable_dialog 0.0.1 copy "reusable_dialog: ^0.0.1" to clipboard
reusable_dialog: ^0.0.1 copied to clipboard

A customizable and reusable dialog package for Flutter, providing flexible alert dialogs with styled buttons and easy integration.

example/main.dart

import 'package:flutter/material.dart';
import 'package:reusable_dialog/app_dialogs.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Reusable Dialog Example',
      home: const HomePage(),
    );
  }
}

class HomePage extends StatelessWidget {
  const HomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Dialog Demo'),
      ),
      body: Center(
        child: ElevatedButton(
          onPressed: () {
            AppDialog.warning(
              context: context,
              title: 'Warning',
              msg: 'Do you really want to continue?',
              onOk: () {
                Navigator.of(context).pop();
                ScaffoldMessenger.of(context).showSnackBar(
                  const SnackBar(content: Text('Action confirmed.')),
                );
              },
            );
          },
          child: const Text('Show Warning Dialog'),
        ),
      ),
    );
  }
}
0
likes
140
points
23
downloads

Publisher

unverified uploader

Weekly Downloads

A customizable and reusable dialog package for Flutter, providing flexible alert dialogs with styled buttons and easy integration.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

app_style, flutter, reusable_button

More

Packages that depend on reusable_dialog