flutter_animated_toast 0.0.4 copy "flutter_animated_toast: ^0.0.4" to clipboard
flutter_animated_toast: ^0.0.4 copied to clipboard

A customizable Flutter toast package featuring clean animations, flexible styling, and easy usage for modern apps.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_animated_toast/flutter_animated_toast.dart';

void main() {
  runApp(const ExampleApp());
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text("Flutter Animated Toast Example")),
        body: Center(
          child: Builder(
            builder: (context) {
              return ElevatedButton(
                onPressed: () {
                  FlutterAnimatedToast.show(
                    context,
                    message: "Success!",
                    // message: "Warning!",
                    // message: "Error!",
                    // message: "Info!",
                    icon: Icon(Icons.check_circle_outline, color: Colors.white, size: 16.0,),
                    // icon: Icon(Icons.warning_amber_outlined, color: Colors.white, size: 16.0,),
                    // icon: Icon(Icons.error_outline_outlined, color: Colors.white, size: 16.0,),
                    // icon: Icon(Icons.info_outline, color: Colors.white, size: 16.0,),
                    backgroundColor: Colors.green,
                    // backgroundColor: Colors.amber,
                    // backgroundColor: Colors.red,
                    position: ToastPosition.top,
                    // position: ToastPosition.center,
                    // position: ToastPosition.bottom,
                    // duration: Duration(seconds: 5),
                  );
                },
                child: const Text("Show Toast"),
              );
            },
          ),
        ),
      ),
    );
  }
}
2
likes
140
points
32
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A customizable Flutter toast package featuring clean animations, flexible styling, and easy usage for modern apps.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flutter_animated_toast