toastify_flutter 1.0.3 copy "toastify_flutter: ^1.0.3" to clipboard
toastify_flutter: ^1.0.3 copied to clipboard

A simple plugin to show custom toasts in Flutter apps

example/lib/main.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Material App',
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Material App Bar'),
        ),
        body: const MyHome(),
      ),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Center(
      child: FilledButton(
          onPressed: () {
            ToastifyFlutter.show(
              context,
              message: 'This is a custom toast message',
              position: ToastPosition.top,
            );
          },
          child: const Text('Show toast')),
    );
  }
}
8
likes
0
points
122
downloads

Publisher

unverified uploader

Weekly Downloads

A simple plugin to show custom toasts in Flutter apps

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on toastify_flutter