tfk_toast 0.2.3 copy "tfk_toast: ^0.2.3" to clipboard
tfk_toast: ^0.2.3 copied to clipboard

tfk_toast is a lightweight Flutter package for displaying customizable toast messages.

TfkToast #

pub package GitHub issues GitHub stars GitHub license

TfkToast is a Flutter package designed to display beautiful and customizable toast notifications. Toast messages provide non-intrusive feedback to users, enhancing their experience.

Features #

  • Customizable Toasts: Display toasts with various types (info, warning, error, success).
  • Customizable Title and Message: Add a title and message to your toast notifications.
  • Automatic Dismissal: Toasts automatically disappear after a few seconds.
  • Manual Dismissal: Optionally, allow users to manually close the toast.

Video Preview

Installation #

Add tfk_toast to your pubspec.yaml file:

dependencies:
  tfk_toast: ^0.2.2

Then run:

   flutter pub get

Usage #

Import the package in your Dart file:

import 'package:tfk_toast/tfk_toast.dart';

To show a toast, use the following code:

INITILIALIZE THE PACKAGE TO REMOVE passing context direct the package #

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

  @override
  Widget build(BuildContext context) {
  return MaterialApp(
  /****\*\*\***** INITIALIZE THE TOAST KEY HERE \*/
  navigatorKey: TfkToast.navigatorKey, //
  home: Scaffold(
  appBar: AppBar(
  title: const Text('Custom Toast Example'),
  backgroundColor: Colors.blue,
       ),
     ),
   );
 }
}

TfkToast.showToast("This is an toast title message!",
      title: "Toast Title",
      position: ToastPosition.top,
      icon: const Icon(
      Icons.info,
      color: Colors.white,
      ),
      backgroundColor: Colors.pinkAccent
);
2
likes
130
points
29
downloads

Publisher

unverified uploader

Weekly Downloads

tfk_toast is a lightweight Flutter package for displaying customizable toast messages.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on tfk_toast

Packages that implement tfk_toast