m_toast 0.2.4

SDKflutter
Platformandroidioswindowslinuxmacosweb

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

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.

nametypeneeddesc
messageStringrequiredToast message
textColorColoroptionalColor of text(toast message)
backgroundColorColoroptionalbackgroundColor
alignmentToastPositionrequired
iconColorColoroptionalIf Color is not given the icon will adapt the default color
iconIconDataoptionalIcon in Toast
imageAssetImageoptionalImage instead of Icon
durationintoptionalDuration should be given in milliseconds(for eg duration: 1500)
elevationdoubleoptionalElevation(0.0)
widthdoubleoptionalwidth

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.