sh_toast 0.0.1 copy "sh_toast: ^0.0.1" to clipboard
sh_toast: ^0.0.1 copied to clipboard

outdated

Toast Library for Flutter All Platform.

sh_toast #

sh_toast is a Flutter package that provides a simple way to display toasts (short-lived notifications) in your app.

Usage #

To use this package, you need to include it in your pubspec.yaml file:

dependencies:
  sh_toast: ^1.0.0  # Use the latest version from pub.dev

Then run flutter pub get to install the package.

Import the package in your Dart code:

import 'package:sh_toast/sh_toast.dart';

Wrap your app's root widget with FToastBuilder():

return MaterialApp(
  builder: FToastBuilder(),
  // ...
);

Now you can show a toast using ShToast.showToast():

ShToast.showToast(
  message: "Hello, this is a toast!",
  toastPosition: ShToastOption.top, // Specify the position of the toast
);

Available Positions #

  • ShToastOption.top
  • ShToastOption.bottom
  • ShToastOption.topLeft
  • ShToastOption.topRight
  • ShToastOption.bottomRight
  • ShToastOption.bottomLeft

License #

This package is released under the MIT License. See LICENSE for details.


Feel free to modify the description and instructions to better suit your package's purpose. Make sure to also replace ^1.0.0 with the actual version number of your package.

4
likes
0
points
15
downloads

Publisher

unverified uploader

Weekly Downloads

Toast Library for Flutter All Platform.

Homepage

License

unknown (license)

Dependencies

flutter

More

Packages that depend on sh_toast