smart_popup 3.0.0 copy "smart_popup: ^3.0.0" to clipboard
smart_popup: ^3.0.0 copied to clipboard

A versatile Flutter alert dialog with lotties, images, animations, countdown timer, Loading and open duration state for buttons etc.

Smart Popup #

Smart Popup is a customizable alert dialog widget for Flutter applications. It offers various features, including support for Image and Lottie, custom widgets, animations, countdown timers, loading button and responsive design. This widget is highly configurable to fit a wide range of use cases in your application.

Features #

  • Media Support: Display images or lotties within the dialog, providing rich content experiences.
  • Customizable Dialog: Easily adjust the title, description, and buttons to fit your app's needs.
  • Animations: Choose from various animation types (fade, scale, slide) to create engaging transitions.
  • Countdown Timer: Integrate a countdown timer to add urgency to user interactions.
  • Loading Indicators: Show loading states on buttons to inform users of ongoing processes
  • Close Button: Hidable close button
  • Custom Widgets: Include additional custom widgets within the dialog for enhanced functionality.
  • Responsive Design: The widget adapts to different screen sizes, ensuring a seamless experience on both mobile and desktop platforms.

Examples #

Check out the Demo Smart Popup to see Smart Popup in action!

Installation #

Add this package to your pubspec.yaml file:

dependencies:
  smart_popup: ^latest_version

Usage #

To use the Smart Popup, simply create an instance of the widget and configure the desired properties, such as media paths, title, description, button texts, and animations.

showDialog(
  context: context,
  builder: (context) => SmartPopup(
    buttonAlignment: ButtonAlignment.vertical,  // Default Vertical 
    title: "Smart Popup",
    subTitle: "This is a smart popup. It can display alerts and messages",
    primaryButtonText: "Ok",
    secondaryButtonText: "Cancel",
    primaryButtonTap: () {
      Navigator.of(context).pop();
    },
    secondaryButtonTap: () {
      Navigator.of(context).pop();
    },
    // Do not pass popType, Image and lottie simultaneously; pass one at a time.
    popType: PopType.info, 
    // loading: true,
    // imagePath: "assets/images/your_image.png",  // Both asset and network images are supported
    // lottiePath : "assets/images/your_lottie.json" // Both asset and network lotties are supported
    // timerDelay: 10,
    animationType: AnimationType.scale,
  ),
);

16
likes
140
pub points
51%
popularity

Publisher

verified publisherfazilkp.in

A versatile Flutter alert dialog with lotties, images, animations, countdown timer, Loading and open duration state for buttons etc.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_animate, flutter_hooks, flutter_timer_countdown, lottie, smart_wrap

More

Packages that depend on smart_popup