flutter_sliding_toast 1.1.0 copy "flutter_sliding_toast: ^1.1.0" to clipboard
flutter_sliding_toast: ^1.1.0 copied to clipboard

A flutter package for displaying sliding messages from all direction with custom styling and animation.

Flutter Sliding Toast #

pub license: MIT

A flutter sliding toast for displaying message.

🎨 Screenshot #

🎯 Features #

  • Slide the toast from all direction
  • Stick the toast at a position with alignment
  • Define sliding and display duration
  • Define max height and width
  • Set padding inside the toast
  • Set title and trailing widgets
  • Disable the progressbar indicator
  • Glassmorphism design
  • Customize styles and animation behavior
  • Use default success and error toast
  • Dismiss the toast by sliding it horizontally or vertically
  • Pause the animation by long pressing on the toast message
  • Continue the animation by releasing the long press

⚙️ Getting Started #

Add the following line to pubspec.yaml:

dependencies:
  flutter_sliding_toast: ^1.1.0

🚀 Usage #

class MyHomePage extends StatelessWidget {
  const MyHomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("Sliding Toast"),
        centerTitle: true,
      ),
      body: SafeArea(
        child: Center(
          child: ElevatedButton(
            onPressed: () {
              SlidingToast.show(
                context,
                title: const Text(
                  "Hi there! I'm a simple toast 😎. Dismiss me by sliding downward.",
                  style: TextStyle(),
                ),
                trailing: const Icon(Icons.person, color: Colors.deepPurple),
                toastSetting: const ToastSetting(
                  animationDuration: Duration(seconds: 1),
                  displayDuration: Duration(seconds: 2),
                  toastStartPosition: ToastPosition.bottom,
                  toastAlignment: Alignment.bottomCenter,
                ),
              );
            },
            child: const Text("Show Toast"),
          ),
        ),
      ),
    );
  }
}

❤️ Additional information #

Pull requests are welcomed!

If you encounter any problems or you have any ideas, feel free to open an issue:

47
likes
0
points
324
downloads

Publisher

unverified uploader

Weekly Downloads

A flutter package for displaying sliding messages from all direction with custom styling and animation.

Repository (GitHub)
View/report issues

Documentation

Documentation

License

unknown (license)

Dependencies

flutter

More

Packages that depend on flutter_sliding_toast