snappy_toast 1.0.1 copy "snappy_toast: ^1.0.1" to clipboard
snappy_toast: ^1.0.1 copied to clipboard

A lightweight, snappy toast and snackbar manager for Flutter. Show beautiful toast messages or stylish snackbars — without needing `BuildContext`, `Navigator`, or `Stack` setup.

example/lib/main.dart

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

void main() => runApp(const MyApp());

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Smart Toast Demo',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(primarySwatch: Colors.blue),
      home: SmartSnackToastWrapper(child: const SmartSnackDemo()),
    );
  }
}

class SmartSnackDemo extends StatefulWidget {
  const SmartSnackDemo({super.key});

  @override
  State<SmartSnackDemo> createState() => _SmartSnackDemoState();
}

class _SmartSnackDemoState extends State<SmartSnackDemo> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Smart Toast Example')),
      body: Padding(
          padding: const EdgeInsets.all(16.0),
          child: ListView(
            children: [
              /// smart_snack_toast
              ElevatedButton(
                  onPressed: () {
                    SmartToast.show(
                      message: "Hello from SmartToast!",
                      type: ToastType.success,
                      haptic: true,
                      hapticType: HapticFeedbackType.heavy,
                      dismissType: DismissType.onTap,
                    );
                  },
                  child: Text("Press Me!"))
            ],
          )),
    );
  }
}
7
likes
160
points
13
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A lightweight, snappy toast and snackbar manager for Flutter. Show beautiful toast messages or stylish snackbars — without needing `BuildContext`, `Navigator`, or `Stack` setup.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on snappy_toast