showSnackBar

removeCurrentSnackBar

hideCurrentSnackBar

The same named methods of the ScaffoldMessenger should be used instead. A
default ScaffoldMessenger is already created in every MaterialApp.

Migration guide

In-depth migration guide available

Code before migration:

Scaffold

of

context

showSnackBar

mySnackBar

);

Scaffold

of

context

removeCurrentSnackBar

mySnackBar

);

Scaffold

of

context

hideCurrentSnackBar

mySnackBar

);

Code after migration: