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
1 answer

Trying to get Button to copy URL and render snackbar using React Hooks

I'm still learning react hooks. As the title states, when the user hits the button labeled 'Copy to Clipboard' I want it to of course copy the url (which it does), Then I was trying to useEffect so that it will also display a snackbar (from…
0
votes
2 answers

How to dismiss a snackbar when user click elsewhere in flutter?

I am new to flutter so I am not able to find the solution of my problem. I hope to find solution here. When I am clicking back to back then all the snackbar are showing and I have to wait till the last snackbar, but I want only last clicked resulted…
khushbu
  • 47
  • 4
0
votes
3 answers

How to make Vuetify snackbar fit around text?

I am making use of Vuetify's snackbar component and it seems there is a fixed minimum width cos no matter how short the text is, it doesn't reduce the snackbar, the size only changes when the text gets really long. Is it possible to "force" the…
Fiyin Akinsiku
  • 166
  • 2
  • 13
0
votes
1 answer

Create a global snackbar using Vue, Vuetify and Vuex

I try to create a global snackbar to trigger every times an axios http error occurs, I followed this tutorial : https://dev.to/stephannv/how-to-create-a-global-snackbar-using-nuxt-vuetify-and-vuex-1bda But I don't want use Nuxt, only Vue, Vuex and…
McFlooz
  • 15
  • 7
0
votes
1 answer

kotlin unresolved reference none of the following candidates is applicable because of receiver type mismatch

HandleAPIError in Utils class. create custom method for Snackbar for the API Error. Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: public fun View.snackbar(message: String, action: (() →…
Pinkesh
  • 61
  • 3
  • 12
0
votes
1 answer

illegalStateException about snackBar

I got illegalStateException when I compiled my snackbar. The result of App is that I can execute the first button but once I tried to use my second button the app will crush. The code and error message are shown like this: public void…
0
votes
1 answer

Using MatSnackBar in a library

I have an issue with using MatSnackBar from within a library. I have created a simple component which looks like this:
{{message}}
r3plica
  • 13,017
  • 23
  • 128
  • 290
0
votes
1 answer

AlertDialog or SnackBar after user is successfully logged in

I need a little help with an issue I can't seem to understand quite completely. I am pratcicing with AWS and I need to display a message for my Login screen after the user has logged in or to display an error message if the login has failed. The…
GrandMagus
  • 600
  • 3
  • 12
  • 37
0
votes
1 answer

in Flutter when I call a showSnackBar, it keeps on showing until I refresh the page. It does not disappear by itself

_scaffoldKey.currentState.showSnackBar(SnackBar( content: Text('You dont have enough money'), )); When I give it time it does not work as well. Can it be because I am calling it from a function?
aebal99
  • 43
  • 5
0
votes
0 answers

How to remove or hide the current snackbar in flutter with scaffoldkey?

The below code works fine but doesn't hide snack bar on user signout. It invokes the code _scaffoldKey.currentState.hideCurrentSnackBar(); but doesn't hide the snackbar. How to remove or hide the current snackbar? class HomeScreen extends…
Ramesh Kumar
  • 147
  • 14
0
votes
2 answers

I want to add a SnackBar inside my flutter application

I want to add a Snack bar that tells a user to scroll up when images added to the body is more than 2..the problem is I can't put the snack bar in a scaffold because the add image button is just a reference in the scaffold widget. I'm new to asking…
0
votes
2 answers

Snackbar appearing repeatedly after appearing once

I have shown snackbar after incorrect login in flutter. But after appearing once, the snackbar is appearing repeatedly without even pressing the submit button. Where am I doing wrong? Please help. Here is my code below. In the snapshot.data.status…
Ayan
  • 165
  • 1
  • 1
  • 9
0
votes
0 answers

Render array in React one-by-one, having pauses between

I'm having trouble rendering multiple Snackbars, I know it's not allowed to render multiple at once, so I tried notistack,but when I put maxSnack={1} autoHideDuration={3000} and I enqueue 2 Snackbars, then the first one disappears immediately, and I…
0
votes
2 answers

Inserting HTML into a Snackbar message

So I'm forking off a sample Twilio video chat app (https://github.com/twilio/twilio-video-app-react). For the chat feature, Snackbar messages are employed. Which works fine. But I want to allow the user to send a message starting with http, so that…
gregarican
  • 105
  • 1
  • 11