Elegant Toast UI for Flutter Apps, inspired from iOS

  Toast, UI

Toasta

Simple, Smooth & Elegant toast libary for Flutter on all Platform. Inspired by iOS. Github Repo

iOSAndroid
Demo

Web Demo

How to use

Step 1: Add to pubspec.yaml

flutter pub add toasta

Step 2: Wrap your MaterialApp to ToastaContainer

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return ToastaContainer( // Wrap your app by ToastaContainer
      child: MaterialApp(
        ...
      ),
    );
  }
}

Step 3: Start using

final toast = Toast(title: "Hello World", subtitle: "This is Toasta");
Toasta(context).toast(toast);
PropertyDescriptionDefault
height doubleHeight of toast56
width doubleWidth of toast70% of screen width
darkMode boolDark modefalse
fadeInSubtitle boolFade in animation for subtitlefalse
title String WidgetThe upper part of toast, you can passing both String or Widget to customizenull
subtitle String WidgetThe lower part of toast, you can passing both String or Widget to customizenull
leading WidgetCustomize leading part of toastnull
trailing WidgetCustomize trailing part of toastnull
onTap FunctionCallback on tap Toastnull
onAppear FunctionCallback after appeared Toastnull
onExit FunctionCallback after disappeared Toastnull
status EnumYou can passing ToastStatus success failed warning infonull
backgroundColor ColorCustomize background colornull
duration DurationDuration of toastDuration(seconds: 3)
borderRadius BorderRadiusBorder Radius of toastBorderRadius.all(Radius.circular(25.0))

Support

Feel free to suggest features, reporting bugs or customize attributes.

Download Toasta source code on GitHub