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
2 answers

How to properly show snackbar after refresh indicator hide

i have RefreshIndicator and inside it ListView so that RefreshIndicator work swipe down gesture on ListView, also i have set GlobalKey() to RefreshIndicator so that i can show indicator on button tap. all is wokring but in…
Burhan Khanzada
  • 945
  • 9
  • 27
0
votes
1 answer

Update GetX snackbar's duration once user clicks / taps it?

Can the initial GetX snackbar's duration be updated once a user clicks it? E.g. After the user clicks on snackbar I would like to make it visible for additional x seconds.
0
votes
3 answers

Any way to show a snackBar once per stateful page build?

I want to show SnackBar pop-up once per build of a certain stateful page. This is a Flutter web project. Any help will be appreciated.
Delwinn
  • 891
  • 4
  • 19
0
votes
0 answers

Could not able to change the width of snackbar using material 1.5.0

Could not able to change the width of the snackbar when migrated material design from 1.3.0 to 1.5.0. Using below code : val contentLayoutParams = snackBar.view.layoutParams as FrameLayout.LayoutParams contentLayoutParams.width =…
Rathan Kumar
  • 2,567
  • 2
  • 17
  • 24
0
votes
0 answers

Click listener for entire Snakbar layout

I have a snackbar and I showing information to users. If user click Snackbar, I want to open an other fragment. private fun showLastUnsuccessfulLoginMessage(message: String) { val snackbar = Snackbar.make(view!!, message ,…
Mert DEMIRKIRAN
  • 418
  • 5
  • 18
0
votes
1 answer

Flutter how to send a feedback on input error

Send a feedback on input error Im working on a flutter i need a label to report errors on login phase. I can't find anything related to text label on flutter. Everytime i search for it i get TextField and i don't need it. I would like to use a Label…
DoktorSAS
  • 21
  • 6
0
votes
1 answer

Flutter return snackbar on successfully posting data to API

I am trying to display a snackbar for both success and failure of posting data to an API. The bar appears to be appearing which is great, but it seems be showing the success even when the data should fail. I am expecting that the then only renders…
Boss Nass
  • 3,384
  • 9
  • 48
  • 90
0
votes
1 answer

How can I change Snackbar background text color in Android Studio?

My Snackbar background displays the default background I've set on the Theme.xml. So, how do I change the background color of the SnackBar? Any help would be much appreciated. protected void onCreate(Bundle savedInstanceState) { …
user10817807
0
votes
1 answer

Is there a way/workaround to show a snackbar on top of the blurred dialog with Flutter?

Below is the screenshot of the current situation/problem. I have a dialog that has a blurred background. I want to show a snackbar when the user clicks the "copy referral link" button. However, since I put a blurred background on the dialog,…
0
votes
1 answer

Is there way to automate Snack Bar text using Protractor?

I'm trying by using bellow sample code but is not working properly, can you know anyone kindly suggest way or what are the changers to do. getText: async function() { return await new Promise(async function(resolve, reject) { return await…
0
votes
1 answer

Unexpected function expression - ESLint error when using MUI Snackbar Component customized with Alert

I want to create a customized MUI Snackbar using MUI Alert by following the example in the official Documentation but ESlint is showing me this error: error Unexpected function expression prefer-arrow-callback error Prop spreading is forbidden …
0
votes
1 answer

Snackbar action give "Looking up a deactivated widget's ancestor is unsafe" error if ancestor is close

I have showModalBottomSheet with list of folder name. If user want to add file into folder, click add and ModalBottomSheet will show up and user tap the folder name and call the bloc event to add file into folder. If success, I got…
Alex Aung
  • 2,637
  • 5
  • 34
  • 63
0
votes
1 answer

Snackbar text parameter deprecated

So i am working with an app in jetpack compose and i see this tutorial Tutorial. This tutorial builds a default snackbar within a snackbarhost and adds a text to this snackbar in the way below. Though when i try to add this parameter it tells me…
jens
  • 207
  • 2
  • 9
0
votes
1 answer

How to display Snack Bar Material UI inside if statment

I want to show a snackbar notification in case my Camera Component returns some error. I tried to put the component inside a function and pass the error message as props, and call it in the if statement but didn't work. I also tried return the…
Cezene
  • 73
  • 2
  • 14
0
votes
0 answers

Show snackbar without margin Android

I am having a little problem to implement a snackbar. I want my snackbar to take full width and stick to the bottom but it has margin from the bottom and its sides. How can I custom it? What I tried (not working) val params :…
Lucy
  • 121
  • 12