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

To Show Alert Dialog

example/lib/main.dart

import 'package:custom_alert_dialog_package/custom_alert_dialog_package.dart';
import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const Home(),
    );
  }
}

class Home extends StatelessWidget {
  const Home({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Container(
          child: MaterialButton(
            color: Colors.red,
            child: Text("Click me"),
            onPressed: () {
              CustomAlertDialog.showAlertDialog(
                context: context,
                displayWidget: Text("It worked!!"),
              );
            },
          ),
        ),
      ),
    );
  }
}
1
likes
150
points
15
downloads

Publisher

unverified uploader

Weekly Downloads

To Show Alert Dialog

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on custom_alert_dialog_package