Skip to main content

snackbar_alert 0.0.2 copy "snackbar_alert: ^0.0.2" to clipboard
snackbar_alert: ^0.0.2 copied to clipboard

A simple Flutter package for success and error snackbars.

snackbar_alert #

A simple Flutter package for showing success and error snackbars with a clean design.


✨ Features #

  • ✅ Show success snackbar with green background and check icon
  • ❌ Show error snackbar with red background and error icon
  • 🎯 Customizable appearance (text, icons, duration, etc.)
  • 🚀 Easy to use — only one line of code

📦 Getting started #

Add this package to your pubspec.yaml:

dependencies:
  snackbar_alert: ^0.0.1

## Example

The following example shows how to use `snackbar_alert`:

```dart
import 'package:flutter/material.dart';
import 'package:snackbar_alert/snackbar_alert.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("Snackbar Alert Example")),
        body: Center(
          child: ElevatedButton(
            onPressed: () {
              SnackbarAlert.success(context, "Success Snackbar Example!");
            },
            child: const Text("Show Snackbar"),
          ),
        ),
      ),
    );
  }
}
1
likes
145
points
11
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A simple Flutter package for success and error snackbars.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on snackbar_alert