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

does not work material ui snackbar in nextjs

I'm trying to work material-ui snackbar component on my nextjs project, but it not working. And next, I try to this code on reactjs it's working so nicely. that's my code is working on reactjs but does not working on nextjs. Please help me, guys. My…
0
votes
2 answers

ERROR : SnackBar content - Looking up a deactivated widget's ancestor is unsafe

I have a problem and it is with respect to the content of the SnackBar. I created a class where it contains the following: class ActionSuccessSnackBar extends StatelessWidget { const ActionSuccessSnackBar({ Key key, this.isCreation, …
Daniel Roldán
  • 1,328
  • 3
  • 20
0
votes
1 answer

Flutter null-safety migration - top_snackbar_flutter

I did a dart migrate to update my project to null-safety. I have several issues to sort as it was an old project. However, one thing is stumping me a lot and unable to figure out a way. I am using top_snackbar_flutter package and updated the same to…
Vivian Lobo
  • 583
  • 10
  • 29
0
votes
0 answers

How can I make snackbar error message work?

Can I use such function to display snackbarError message ? I get this errors : at com.firestore.intro.signUpActivity.onCreate$lambda-0(signUpActivity.kt:29) at com.firestore.intro.signUpActivity.$r8$lambda$JcZyp7qOhhfZOMNqGi0G1w812tc(Unknown…
0
votes
1 answer

How to set the heightof a snackbar?

I produce the following snackbar with the following code: Snackbar: Snackbar Code: View parentLayout = findViewById(android.R.id.content); Snackbar snackbar = Snackbar.make(parentLayout, "Wähle mindestens eine Kategorie aus, um…
Tobi Z
  • 29
  • 2
0
votes
2 answers

How to Display a Widget Over the Screen in flutter?

I want to Display a Widget like this over the Image/Screen: I try to do this with snackbar with following code: SnackBar( elevation: 5, padding: const EdgeInsets.all(0), backgroundColor: Colors.transparent, behavior:…
Zilaid
  • 464
  • 6
  • 22
0
votes
1 answer

Angular Material - Type 'string' is not assignable to type 'MatSnackBarHorizontalPosition'

I have created a function that shows the message using material snackbar. showMessage(message: string, position = { horizontal: "right", vertical: "bottom" }): void { const _htmlMessage ="some message"; …
Sunil Garg
  • 14,608
  • 25
  • 132
  • 189
0
votes
2 answers

How to display a snackbar or toast at top of the screen in xamarin forms

I implemented snackbar in xamarin project. But I need to displaty that snackbar at top of the screen. Code: SnackBarOptions options = new SnackBarOptions { MessageOptions = new MessageOptions { Foreground = Color.Black, …
Priyanka
  • 138
  • 2
  • 15
0
votes
1 answer

when snackbar is being displayed on screen and at the same time if back button is pressed, it throws error in console in flutter / dart

when snackbar is being displayed on screen and at the same time if back button is pressed, it throws error in console in flutter / dart I have removed snackbar by using return WillPopScope( onWillPop: () async { …
Kamlesh
  • 5,233
  • 39
  • 50
0
votes
2 answers

Flutter show Snacksbar after time on different screen

Inside my app the user can download some data. If that finished I would like to show a Snackbar. I know I can show it inside a Widget with: ScaffoldMessenger.of(context).showSnackBar(snackBar); The thing is that the user can change Screen during…
Chris
  • 1,828
  • 6
  • 40
  • 108
0
votes
0 answers

The argument type 'Context' can't be assigned to the parameter type 'BuildContext' in snackbar

im facing the error in snackbar context im not able to do resolve this i applied path library, dart.js, this.context but cant resolve the error ScaffoldMessenger.of(context).showSnackBar show red snake at context
haider
  • 1
0
votes
1 answer

How to show snackbar message on next screen in Flutter / Dart?

I have 2 screens in my Flutter project: List of records screen Add record screen When a record is submitted and added on "Add record screen" then screen is redirected to "List of records screen" and shows added records on this screen which is…
Kamlesh
  • 5,233
  • 39
  • 50
0
votes
1 answer

Problem with text color in snackbar KivyMd

I read kivymd Snackbar documentation where they say that i can change text color in this way. Snackbar(text="[color=181818]Elemento copiato negli appunti![/color]").show() But when I execute it this is the result: So the color hasn't changed, and…
0
votes
0 answers

React Snackbar Compnent from notistack not able to handle long text in its GUI as the text goes out in case of small window size

I am new to React UI Libraries like material-ui and notistack. In my project Components like are being used with some styling/css. In the whole react application when there is a long dynamic text that is put inside this Snackbar component its GUI…
Sherlock2019
  • 1
  • 1
  • 2
0
votes
1 answer

Flutter SnackBar leaves an invisible padding in the Scaffold

I am showing a log in button in a page. Once the user has logged in, the SnackBar will display "Logged In with Google" for example. While the SnackBar is still showing, the body of the Scaffold is being build to a new page, the one accessible by…
FCR
  • 1,103
  • 10
  • 25