custom_toast

A simple and customizable Toast package for Flutter to show brief messages with smooth animations and flexible styling.

Features

  • Easy to use Toast
  • Customizable toast duration, position, and appearance
  • Supports light and dark themes
  • Smooth fade and slide animations
  • Works on both Android and iOS

Getting Started

🚀 Installation

Add this to your pubspec.yaml:

dependencies:
  custom_toast: ^1.0.0

🛠️ Usage

➤ Import the package
import 'package:custom_toast/custom_toast.dart';

Basic usage
CustomToast.show(
  context,
  message: "This is a toast message!",
);



🎨 Customization

CustomToast.show(
  context,
  message: "Custom styled toast",
  type: ToastType.success,
  duration: Duration(seconds: 4),
  backgroundColor: Colors.green.shade800,
  borderRadius: 20,
  icon: Icons.check_circle,
  fromBottom: true,
);


Supported toast types
ToastType.info
ToastType.success
ToastType.warning
ToastType.error



Example:
ElevatedButton(
  onPressed: () {
    CustomToast.show(
      context,
      message: "Toast with Custom Style",
      backgroundColor: Colors.blue,
      borderRadius: 40,
      icon: Icons.ac_unit,
      fromBottom: true,
    );
  },
  child: const Text("Show Custom Bottom Toast"),
)