Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
3 answers
2k views

Don't use 'BuildContext's across async gaps in Flutter warning doesn't go away

Flutter gives me the warning "Don't use 'BuildContext's across async gaps. Try rewriting the code to not use the 'BuildContext', or guard the use with a 'mounted' check". The warning is in ...
AvestaChang's user avatar
3 votes
3 answers
6k views

How can I fix exception "Floating SnackBar presented off screen" in flutter

I have an app that displays a snackbar when some action is done. I had tested this with my phone and some emulator and it works. Recently I installed an emulator with android 13 and maybe a bigger ...
nck's user avatar
  • 2,161
0 votes
1 answer
941 views

How to resolve the Show Snack Bar Error in Line Context

Recently i am trying to run the project but seem the snackbar is have some kind of error like this the compiler show the error below the "context" message how to solve it? void ...
Blaismer's user avatar
1 vote
1 answer
1k views

Flutter: SnackBar not displayed after calling setState() method

I'm implementing this products app where a user can add a product from his wish list and add it to their cart. Once the user clicks the add to cart button, I want to delete the product from the screen ...
AK-23's user avatar
  • 388
38 votes
10 answers
33k views

Flutter Showing Snackbar On Top of Bottom Sheet

In my code I call a bottom sheet to display a list of tiles. These tiles contain buttons that display a snackbar. That functionality works fine, the only issue is that the snackbar is displayed behind ...
Samuel Drescher's user avatar
10 votes
3 answers
5k views

Flutter: How to display a snackbar from an appbar action

I'm trying to display a SnackBar after performing an action from the AppBar. The AppBar cannot be built from a builder so it can't access is Scaffold ancestor. I know we can use a GlobalKey object to ...
Quentin's user avatar
  • 636
2 votes
1 answer
7k views

Duplicate GlobalKey detected in widget tree in foreach

I have a map with loop of markers, for each marker i try to show snackbar with location name. I have a code similar to. static final GlobalKey<ScaffoldState> scaffoldKey = ...
El Hombre Sin Nombre's user avatar
85 votes
20 answers
194k views

Display SnackBar in Flutter

I want to display a simple SnackBar inside Flutter's Stateful widget. My application creates new instance of MaterialApp with a stateful widget called MyHomePage. I try to show the SnackBar in ...
kosiara - Bartosz Kosarzycki's user avatar