Questions tagged [snackbar]

Snackbars provide lightweight feedback about an operation. They show a brief message at the bottom of the screen on mobile and lower left on larger devices. Snackbars appear above all other elements on screen and only one can be displayed at a time.

Introduction

Snackbars provide lightweight feedback about an operation. They show a brief message at the bottom of the screen on mobile and lower left on larger devices. Snackbars appear above all other elements on screen and only one can be displayed at a time.

They automatically disappear after a timeout or after user interaction elsewhere on the screen, particularly after interactions that summon a new surface or activity. Snackbars can be swiped off screen.

Snackbars can contain an action which is set via setAction(CharSequence, android.view.View.OnClickListener).

Documentation

Usage of SnackBar

493 questions
0
votes
4 answers

Open SnackBar inside function sent to AppBar

I have a page with a form. Once the user clicks on Save, it should display a SnackBar. The save button is in a separate custom AppBar widget (in a separate file) and it has 2 functions that is sent from the page with the form. The AppBar is…
0
votes
1 answer

Flutter Unhandled Exception: NoSuchMethodError: The getter 'currentState' was called on null

I have this problem (Flutter Unhandled Exception: NoSuchMethodError: The getter 'currentState' was called on null.)when i am using showSnackBar while sending data. It appear right after the data get send, dont understand where exactly i am doing…
Rock
  • 511
  • 2
  • 7
  • 18
0
votes
1 answer

fixed snackBar in bottom of screen

i am new to dart So i am frustrated by the snackBar is appears just in the footer of the body. and above of persistentFooterButtons and bottomNavigationBar plz someone help me to fixed the snackbar on the end of screen . this my code: Widget…
user41vall
  • 11
  • 1
  • 3
0
votes
0 answers

Remove element from an array (useState) via onClick

I have an array that contains elements: const [snackbars,setSnackbars]=useState([ Snackbar 1 , ... ]} I want to click on the ,…
OttherCreek
  • 615
  • 1
  • 6
  • 18
0
votes
1 answer

NoSuchMethodError: The method 'showSnackBar' was called on null

I'm trying to show a snackbar message once the user presses the "add to cart" button, but I get the following error: [VERBOSE-2:ui_dart_state.cc(166)] Unhandled Exception: NoSuchMethodError: The method 'showSnackBar' was called on null. Receiver:…
0
votes
1 answer

Is it possible to use a snackbar inside a function in flutter?

I currently have a password reset page on my app. The widget call a password reset function when the button is pressed. I have the reset button inside a Builder. I have test a snackbar inside the onPressed and it woks fine . But I want to be able to…
Waseem Ahmed
  • 379
  • 1
  • 5
  • 17
0
votes
0 answers

Show SnackBar on navigator.pop() in Flutter?

I have created a simple shopping app. Im trying to show a snackbar on the main home screen when a user adds a product to the cart. The HomeScreen has a ListView.builder that builds the list. Each child of this builder directs to a ItemDetailsScreen…
0
votes
1 answer

How to get variant value inside content of SnackbarProvider

I am using notistack library for showing snackbar in my application. I wanted to customise the content of snackbar. Hence using content property of snackbar. I wanted to know whether the message variant is success or warning or error, and based on…
Mahesh
  • 1,427
  • 2
  • 19
  • 42
0
votes
1 answer

How to increase snackbar height and adjust text size in react native?

I am using react-native-snackbar in my application i want to show message with snackbar. how to set height and make message text size bigger in snackbar any possible ways to do in react native. Thank you in advance.
0
votes
1 answer

Snackbar - Cannot set margin in snackbar

Snackbar margins are not working at all. I'm trying to set margins in all the 4 sides of the snackbar layout. Coordinator Layout: CoordinatorLayout.LayoutParams layoutParams = (CoordinatorLayout.LayoutParams)…
user11969024
0
votes
1 answer

How to display Snackbar in any tab of a DefaultTabController?

I am trying to show Snackbar on a Firebase Cloud Message event, not on the push of a button as most examples are showing. I have a DefaultTabController like the one below. Where would I put my Snackbar in the tree to have the message display in any…
giorgio79
  • 3,787
  • 9
  • 53
  • 85
0
votes
1 answer

SnackbarContentLayout class not found after migration to AndroidX

After migration to AndroidX my app crashes after calling Snackbar.make() method. The error looks like Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class android.support.design.internal.SnackbarContentLayout …
0
votes
1 answer

Angular snackbar service jasmine testing

I want to test with jasmine a snackbar service. More specific, I'm testing the following two cases: That the service is created The method inside it to be called snackbar.service import { Injectable, NgZone } from '@angular/core'; import {…
blk
  • 27
  • 1
  • 6
0
votes
0 answers

keep angular 8 toast/snackbar alive for long running task

I have implemented angular 8 snack bar using the default snackbar in angular. However I have an excel extraction happening on the server that i would like to report its progress...I am implementing signalR to send the progress to the client, but not…
0
votes
1 answer

Why android snackbar is invisible with mapview?

I am using map from Yandex MapKit. When user taps on the map I show him search results, add placemark and show snackbar with location name and button. Problem On my Xiaomi device (Xiaomi Mi 9, android 9) snackbar exists, but it is invisible until…
makeitokay
  • 1
  • 1
  • 1