Search packages, repositories and app categories

m_toast cover
Package detailsv0.2.4

m_toast

Custom Toast for flutter, easily create toast with one line of code.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
120
Likes
40
Pub points
140

Install package

flutter pub add m_toast

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

m_toast is a lightweight Flutter package that enables developers to display customizable toast messages with minimal code. Designed for simplicity, it allows showing toasts in just one line of code, making it ideal for quick feedback in apps. Supports multiple platforms including Android, iOS, Web, macOS, Windows, and Linux. The package offers easy customization of appearance, duration, and positioning, enhancing user experience without adding complexity. It's particularly useful for providing instant notifications for actions like form submissions or button clicks.

Use cases

  • Displaying quick feedback after user actions
  • Showing success or error messages
  • Enhancing UX with subtle notifications
  • Simplifying toast implementation across platforms
  • Providing non-intrusive alerts

Key features

  • One-line toast creation
  • Customizable appearance and timing
  • Cross-platform support
  • Minimal boilerplate
  • Easy integration with existing Flutter projects
  • Configurable position and animation

Suitable for

  • Beginner Flutter developers
  • Apps needing simple notification systems
  • Projects requiring consistent toast styling
  • Developers seeking fast implementation
  • UI-focused applications

Considerations

  • Limited advanced customization options
  • May require additional styling for complex designs
  • Not suitable for persistent notifications
  • Depends on external dependency management
  • Best for transient, brief messages only

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

MToast

pub package pub package

Toast Library for Flutter

Supported Platforms

  • Android
  • IOS
  • Android
  • Linux
  • MacOS
  • Windows

Features

  • Add toast with custom icons, color and message
  • Add toast with custom images, color and message

Getting Started

In order to add m_toast to your project add this line to your pubspec.yaml file

# add this line to your dependencies
m_toast: ^0.2.4
import 'package:m_toast/m_toast.dart';
To call the toast

ShowMToast toast = ShowMToast(context);

toast.successToast(message: "
Hello
"
);
toast.errorToast(message: "
Hello
"
);

Preview Images

Toast with custom images

MToast have default style, and you also can custom style or other behavior.

name type need desc
message String required Toast message
textColor Color optional Color of text(toast message)
backgroundColor Color optional backgroundColor
alignment ToastPosition required
iconColor Color optional If Color is not given the icon will adapt the default color
icon IconData optional Icon in Toast
image AssetImage optional Image instead of Icon
duration int optional Duration should be given in milliseconds(for eg duration: 1500)
elevation double optional Elevation(0.0)
width double optional width

Contribution

Of course the project is open source, and you can contribute to it repository link

  • If you found a bug, open an issue.
  • If you have a feature request, open an issue.
  • If you want to contribute, submit a pull request.

Categories

Source repository

Projects using this package

No data available yet.