Skip to main content

toast_ease 0.0.1 copy "toast_ease: ^0.0.1" to clipboard
toast_ease: ^0.0.1 copied to clipboard

outdated

ToastEase is a Flutter package that provides customizable toast notifications for success, error, warning, and info messages. It offers a flexible design with no external dependencies, allowing you to [...]

example/lib/main.dart

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

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

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

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: HomeScreen(),
    );
  }
}

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

  @override
  State<HomeScreen> createState() => _HomeScreenState();
}

class _HomeScreenState extends State<HomeScreen> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("Toast Ease"),
        centerTitle: true,
      ),
      body: Column(
        mainAxisAlignment: MainAxisAlignment.spaceEvenly,
        crossAxisAlignment: CrossAxisAlignment.center,
        children: [
          Row(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              ElevatedButton(
                  onPressed: () {
                    ToastEase.successToast(
                        context: context, msg: "This is Success Toast");
                  },
                  child: const Text("Success Toast")),
            ],
          ),
          ElevatedButton(
              onPressed: () {
                ToastEase.warningToast(
                    context: context, msg: "This is Warning Toast");
              },
              child: const Text("Warning Toast")),
          ElevatedButton(
              onPressed: () {
                ToastEase.infoToast(
                    context: context, msg: "This is Info Toast");
              },
              child: const Text("Info Toast")),
          ElevatedButton(
              onPressed: () {
                ToastEase.errorToast(
                    context: context, msg: "This is Error Toast");
              },
              child: const Text("Error Toast"))
        ],
      ),
    );
  }
}
1
likes
0
points
15
downloads

Publisher

unverified uploader

Weekly Downloads

ToastEase is a Flutter package that provides customizable toast notifications for success, error, warning, and info messages. It offers a flexible design with no external dependencies, allowing you to easily integrate it into your Flutter applications.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on toast_ease