DEV Community

Cover image for pop_alert new flutter package
Taiwo Hassan
Taiwo Hassan

Posted on • Updated on

pop_alert new flutter package

pop_alert is an open source flutter package for responsive and animated alert/dialog.
package link
also please dont forget to like the package.

Installation

  1. Add the latest version of package to your pubspec.yaml (and runflutter pub get):
dependencies:
  pop_alert: ^0.0.30
Enter fullscreen mode Exit fullscreen mode
  1. Import the package and use it in your Flutter App.
import 'package:pop_alert/pop_alert.dart';
Enter fullscreen mode Exit fullscreen mode

Example
There are a numbers of properties that you can modify:

  • icon
  • title
  • text
  • button

Simple alert show a dialog with no animated icon

PopAlert.simpleAlert(
    context: context,
    title: 'Hello world!',
    button: 'OK',
)
Enter fullscreen mode Exit fullscreen mode
PopAlert.simpleAlert(
    context: context,
    title: 'Title goes here!',
    text: '...and text goes here!',
    button: 'OK',
)
Enter fullscreen mode Exit fullscreen mode

Icon alert show a dialog with animated icon of four type of alert.
The icon can be of four type success, failed, info, and warning.

PopAlert.iconAlert(
    context: context,
    icon: PopAlertIcon.success,
    title: 'Good job!',
    button: 'OK',
)
Enter fullscreen mode Exit fullscreen mode
PopAlert.iconAlert(
    context: context,
    icon: PopAlertIcon.success,
    title: 'Good job!',
    text: 'You clicked the button!',
    button: 'OK',
)
Enter fullscreen mode Exit fullscreen mode

Developers are welcome to contribute to make the package more better. github link
also please dont forget to star the repo.

Top comments (0)