custom_dialog 0.0.2 copy "custom_dialog: ^0.0.2" to clipboard
custom_dialog: ^0.0.2 copied to clipboard

A fully custom alert and dialog box showing messages after a form submit .

example/lib/main.dart

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

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: HomeView(),
    );
  }
}

class HomeView extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Custom dialog box '),
        centerTitle: true,
      ),
      body: Center(
        child: RaisedButton(
          onPressed: () {
            showDialog(
              context: context,
              builder: (context) => CustomDialog(
                content: Text(
                  'No Access',
                  style: TextStyle(
                    fontWeight: FontWeight.w900,
                    fontSize: 20.0,
                  ),
                ),
                title: Text('Error'),
                firstColor: Colors.red,
                secondColor: Colors.white,
                headerIcon: Icon(
                  Icons.error_outline,
                  size: 120.0,
                  color: Colors.white,
                ),
              ),
            );
          },
          child: Text('Press'),
        ),
      ),
    );
  }
}
12
likes
40
pub points
60%
popularity

Publisher

unverified uploader

A fully custom alert and dialog box showing messages after a form submit .

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on custom_dialog