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

This package is used to show toast with multiple animation options.

BGCustomToast #

BGCustomToast is a customizable and animated toast notification package for Flutter. It supports various animations and allows positioning at the top, center, or bottom of the screen. Additionally, you can add optional leading and trailing widgets, such as icons or images, for enhanced styling.

Features #

  • Multiple animation types: Slide, Dynamic Island, Fade, Bounce, Flip, Rotate
  • Customizable position: Top, Center, Bottom
  • Custom duration, padding, margin, and border radius
  • Custom background and text colors
  • Supports leading and trailing widgets (Icons, Images, etc.)

Installation #

Add the following dependency to your pubspec.yaml file:

dependencies:
  bg_custom_toast: latest_version

Then, run:

flutter pub get

Usage #

Import the package:

import 'package:bg_custom_toast/bg_custom_toast.dart';

Show a Simple Toast #

BGCustomToast.show(
  context: context,
  message: "This is a custom toast!",
);

Customize Toast Appearance #

BGCustomToast.show(
  context: context,
  message: "This is a custom toast!",
  position: ToastPosition.bottom,
  animation: ToastAnimation.fade,
  backgroundColor: Colors.blue,
  textColor: Colors.white,
  borderRadius: 20.0,
  padding: 12.0,
);

Supported Animations #

  • Slide: Moves in from top/bottom
  • Dynamic Island: Expands like Apple's Dynamic Island
  • Fade: Smooth fade-in effect
  • Bounce: Bouncing entrance
  • Flip: Rotating flip effect
  • Rotate: Subtle rotating effect

Contributions #

Feel free to submit issues or pull requests to improve this package!

License #

MIT License. See LICENSE file for details.

1
likes
150
points
44
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

This package is used to show toast with multiple animation options.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on bg_custom_toast