awesome_snackbar_content 0.0.5 copy "awesome_snackbar_content: ^0.0.5" to clipboard
awesome_snackbar_content: ^0.0.5 copied to clipboard

Uplift your snackbar experience with various alert messages i.e. success, failure, help or warning with unique UI design.

A package that lets you uplift your SnackBar experience in the app.

🛠 Attributes #

  • title: Top label that will be shown in the body
  • message: Body message reflecting some error message, success message etc.
  • color: Color of SnackBar body
  • contentType: ContentType class reflecting failure, success, help or warning.

📱 Usage #

To use the package:

  • add the dependency to your pubspec.yaml file
dependencies:
  flutter:
      sdk: flutter

  awesome_snackbar_content:

Then import it in your flutter project:

import 'package:awesome_snackbar_content/awesome_snackbar_content.dart';

👀 Looks #

Below are the looks of various types in package

🔴 Failure #

✅ Success #

❔ Help #

⚠ Warning #

💻 Example #

Below is a basic example usage of the awesome_snackbar_content

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

class AweseomSnackBarExample extends StatelessWidget {
  const AweseomSnackBarExample({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: ElevatedButton(
          child: const Text('Show Awesome SnackBar'),
          onPressed: () {
            var snackBar = SnackBar(
              elevation: 0,
              behavior: SnackBarBehavior.floating,
              backgroundColor: Colors.transparent,
              content: AwesomeSnackbarContent(
                title: 'On Snap!',
                message:
                    'This is an example error message that will be shown in the body of snackbar!',
                contentType: ContentType.failure,
              ),
            );

            ScaffoldMessenger.of(context).showSnackBar(snackBar);
          },
        ),
      ),
    );
  }
}

🧑 Credits #

This packages has been created in reference to Abu Anwar (GDE Flutter) YouTube video. So, make sure to check his work!

612
likes
0
pub points
98%
popularity

Publisher

verified publishermhmz.dev

Uplift your snackbar experience with various alert messages i.e. success, failure, help or warning with unique UI design.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, flutter_svg

More

Packages that depend on awesome_snackbar_content