flutter_compact_dialog

pub package

This is compact dialog package for Flutter.

Installation & Uses

Add flutter_compact_dialog as a dependency in your pubspec.yaml file

dependencies:
  flutter_compact_dialog: <current version>

Import CompactDialog in your dart file.

For example

alert

CompactDialog.alert(
    context: context,
    title: 'Info',
    body: 'This is a sample.',
    iconData: Icons.info,
    iconColor: Colors.blue,
    primaryFunction: () {
        Navigator.of(context).pop();
    },
);

confirm

CompactDialog.confirm(
  context: context,
  title: 'Warning',
  body: 'This is a sample. Do you want to run it?',
  iconData: Icons.warning,
  iconColor: Colors.yellow,
  barrierDismissible: false,
  primaryFunction: () {
    Navigator.of(context).pop();
  },
  secondaryFunction: () {
    Navigator.of(context).pop();
  },
);

progress

CompactDialog.progress(
  context: context,
  body: 'Loading...',
  isCenterBody: true,
);

Libraries

animation_icon
compact_dialog