How do I display a snackbar after a delay in Flutter? I tried
Future.delayed(const Duration(milliseconds: 5000), () { ... }
but it doesn't delay it at all.
Well you have to do this after your future execution ends. You do this with then
future method.
Future.delayed(Duration(seconds: 5)).then((_) {
// this code is executed after the future ends.
_scaffoldKey.currentState.showSnackBar( SnackBar(content: Text("SNACKBAR") ) );
} );