A Flutter package to show beautiful animated snackbars directly using overlay

Overview

AnimatedSnackBar

A Flutter package to show beautiful animated snackbars directly using overlay.

Features

  • Material-UI

  • Colorized rectangle

  • Dark rectangle

Getting started

Add package to pubspec.yaml

   dependencies:

    animated_snack_bar: ^0.2.0

Import the package

import 'package:animated_snack_bar/animated_snack_bar.dart';

Usage

  • Show material ui snackbar
AnimatedSnackBar.material(
    'This a snackbar with info type',
    type: AnimatedSnackBarType.info,
).show(context);
  • Show colorized rectangle snackbar
AnimatedSnackBar.rectangle(
'Success',
  'This is a success snack bar',
  type: AnimatedSnackBarType.success,
  brightness: Brightness.light,
).show(
  context,
);
  • Show dark rectangle snackbar
AnimatedSnackBar.rectangle(
'Success',
  'This is a success snack bar',
  type: AnimatedSnackBarType.success,
  brightness: Brightness.dark,
).show(
  context,
);
  • Show a custom snackbar
AnimatedSnackBar(
    builder: ((context) {
        return Container(
            padding: const EdgeInsets.all(8),
            color: Colors.amber,
            height: 50,
            child: const Text('A custom snackbar'),
        );
    }),
).show(context);
  • Changning snackbar pushing position
AnimatedSnackBar.material(
    'This a snackbar with info type',
    type: AnimatedSnackBarType.info,
    mobileSnackBarPosition: MobileSnackBarPosition.bottom, // Position of snackbar on mobile devices
    desktopSnackBarPosition: DesktopSnackBarPosition.topRight, // Position of snackbar on desktop devices
).show(context);
You might also like...

Show custom in-app notification with any Widgets in flutter

Show custom in-app notification with any Widgets in flutter

notify_inapp show custom in-app notification with any Widgets. Getting Started Add this to your package's pubspec.yaml file: dependencies: notify_in

Aug 19, 2022

A Flutter widget to show a text form field to display a date or clock dialog

A Flutter widget to show a text form field to display a date or clock dialog

A Flutter widget to show a text form field to display a date or clock dialog. This widget extend TextField and has a similar behavior as TextFormField.

Jan 6, 2023

Main focus is to show dynamic operation not supported in Stateless Widget of Flutter

 Main focus is to show dynamic operation not supported in Stateless Widget of Flutter

A new Flutter project. It will count the number of donut(Though increment doesnot take place Stateless Widget). Main focus is to show dynamic operation not supported in Stateless Widget of Flutter.

Sep 9, 2022

A Flutter plugin which makes it straightforward to show the native equivalent of a CupertinoAlertDialog or CupertinoActionSheet dialog

A Flutter plugin which makes it straightforward to show the native equivalent of a CupertinoAlertDialog or CupertinoActionSheet dialog

A Flutter plugin which makes it straightforward to show the native equivalent of a CupertinoAlertDialog or CupertinoActionSheet dialog

Dec 9, 2022

A basic Flutter app that includes some native Widgets like alerts, cards, avatars, animated container, inputs, etc.

A basic Flutter app that includes some native Widgets like alerts, cards, avatars, animated container, inputs, etc.

Flutter components This project was created with Flutter and some native Widgets like alerts, cards, avatars, animated container, inputs, etc. Getting

Nov 15, 2021

Animated, highly customizable, open-source Flutter gauge indicator widgets

Animated, highly customizable, open-source Flutter gauge indicator widgets

Animated, highly customizable, open-source Flutter gauge indicator widgets. They use renderbox under the hood, thus ensuring high performance.

Jun 10, 2022

Telegram Animated Widget

telegram_widgets A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started

Jul 10, 2022

Sliding card is a highly customizable flutter package that will help you create beautiful Cards with a sliding animation effect.

Sliding Card Introduction Sliding card is a highly customizable flutter package that will help you create beautiful Cards with a sliding animation eff

Nov 4, 2022

Create beautiful Loading and Timer buttons in Flutter

Create beautiful Loading and Timer buttons in Flutter

Argon Buttons (Timer and Loading) Create beautiful Loading and Timer buttons using Argon Buttons. No need to worry about handling animations or timers

Dec 11, 2022
Comments
  • Flutter 3 compatibility

    Flutter 3 compatibility

    /C:/Android/flutter/.pub-cache/hosted/pub.dartlang.org/animated_snack_bar-0.2.1/lib/src/animated_snack_bar.dart:114:20: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null.

    • 'WidgetsBinding' is from 'package:flutter/src/widgets/binding.dart' ('/C:/Android/flutter/packages/flutter/lib/src/widgets/binding.dart'). WidgetsBinding.instance!.addPostFrameCallback(
    opened by JanRegent 7
  • Snackbar stacked by other snackbar

    Snackbar stacked by other snackbar

    This condition happened if we click a button or there is another process that pop up this animated snackbar, if the duration is still on then it will not go off the screen, thus it will be stacked with another snackbar which is not really good in terms of UX, is there any function to immediately close the current animated snackbar so it will pop up consecutively for the next snackbar? Screenshot 2022-07-20 190416

    opened by farhantandia 2
  • Incorrect delay in short time

    Incorrect delay in short time

    Hello!

    Im using this package for my TFG and i see some problem with the intro and outro animation when the duration of the snackbar is short. I mean, when I want to display for a second or less, the outro didn't appear, it pop's out without slide up. It's not a seriouse problem but I open an issue only for bring some feedback.

    opened by Tantrax007 0
  • Fail when sidebar menu is used

    Fail when sidebar menu is used

    Hi! Our app includes some screens containing a sidebar menu (manually added, not from scaffold), and a view with its own navigator overlay. In these cases, the coordinates for the animatedPositioned are calculated taken into account the whole screen, but they are applied only to the view, causing the snackbar to be reduced. I don't know if it is possible to solve the problem, or an optional parameter like 'offset' or similar would be convenient.

    opened by juanmigrau 1
Owner
Sajad Abdollahi
Mohammad Sajad Abdollahi - Flutter and dart developer - 21 y.o - CE student
Sajad Abdollahi
A Flutter plugin that makes it easier to make floating/overlay windows for Android with pure Flutter

flutter_floatwing A Flutter plugin that makes it easier to make floating/overlay windows for Android with pure Flutter. Android only Features Pure Flu

Zoe 116 Dec 21, 2022
A basic flutter loading overlay

A basic loading overlay Features Creates a new scope where the user cannot leave until you programmatically pop it. Usage import 'package:flutter/mate

null 0 Nov 8, 2021
Flutter overlay loading dialog example

flutter_overlay_loading_dialog_example Demo

Javeed Ishaq 4 Mar 24, 2022
Provider support for overlay, make it easy to build toast and In-App notification.

overlay_support Provider support for overlay, make it easy to build toast and In-App notification. this library support ALL platform Interaction If yo

Bin 340 Jan 1, 2023
An alternative to Overlay which allows you to easily render and hit test a widget outside its parent bounds

An alternative to Overlay which allows you to easily render and hit test a widget outside its parent bounds. Based on the original idea by @shrouxm he

gskinner team 26 Dec 31, 2022
Animated Search Bar package lets you add a beautiful search bar to your Flutter app.

Animated Search Bar Animated Search Bar package lets you add a beautiful search bar to your Flutter app. Installation Add the latest version of packag

Mohammad Saleh 5 Aug 7, 2022
The public ui library is used with the openim demo, and you can directly use it for secondary development.

flutter_openim_widget The public ui library is used with the openim demo, and you can directly use it for secondary development. import 'package:flutt

null 28 Dec 27, 2022
A sliding up panel widget which can be used to show or hide content, beautiful and simple.

flutter_sliding_up_panel A sliding up panel widget which can be used to show or hide content, beautiful and simple. demo Getting Started dependencies:

null 25 Dec 12, 2022
RoundedLoadingButton is a Flutter package with a simple implementation of an animated loading button, complete with success and error animations.

rounded_loading_button RoundedLoadingButton is a Flutter package with a simple implementation of an animated loading button, complete with success and

Chris Edgington 223 Jan 4, 2023
A simple Flutter widget to add in the widget tree when you want to show nothing, with minimal impact on performance.

nil A simple widget to add in the widget tree when you want to show nothing, with minimal impact on performance. Why? Sometimes, according to a condit

Romain Rastel 127 Dec 22, 2022