Skip to main content

premium_toast_flutter 1.0.4 copy "premium_toast_flutter: ^1.0.4" to clipboard
premium_toast_flutter: ^1.0.4 copied to clipboard

A beautiful and lightweight Flutter package to display animated toast messages for success, error, and alert events. Premium_Toast_Flutter makes your app interactions smoother by providing quick, eleg [...]

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:premium_toast_flutter/premium_toast_flutter.dart';
void main() {
  runApp(const MyApp());
}

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

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      debugShowCheckedModeBanner: false,
      home: PremiumToastFlutterDemo(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            ElevatedButton(
              child: const Text("Success Toast"),
              onPressed: () {
                PremiumToastFlutter.successToast(
                  context,
                  upperToast: false,
                  bottomToast: true,
                  title: "Well Done!",
                  subtitle: "Your message has been sent successfully",
                  toastDuration: const Duration(seconds: 3),
                );
              },
            ),
            ElevatedButton(
              child: const Text("Error Toast"),
              onPressed: () {
                PremiumToastFlutter.errorToast(
                  context,
                  upperToast: false,
                  bottomToast: true,
                  title: "Oops!",
                  subtitle: "Some Error has occurred",
                  toastDuration: const Duration(seconds: 3),
                );
              },
            ),
            ElevatedButton(
              child: const Text("Alert Toast"),
              onPressed: () {
                PremiumToastFlutter.alertToast(
                  context,
                  upperToast: false,
                  bottomToast: true,
                  title: "Alert!",
                  subtitle: "There is some alert!",
                  toastDuration: const Duration(seconds: 3),
                );
              },
            ),
          ],
        ),
      ),
    );
  }
}
5
likes
120
points
17
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A beautiful and lightweight Flutter package to display animated toast messages for success, error, and alert events. Premium_Toast_Flutter makes your app interactions smoother by providing quick, elegant, and consistent feedback to users.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

cupertino_icons, flutter

More

Packages that depend on premium_toast_flutter