DEV Community

Dalitso Kasonde
Dalitso Kasonde

Posted on

Undefined name 'ScaffoldMessenger'. Try correcting the name to one that is defined, or defining the name.

  1. Check channel of flutter using flutter channel - This gives a result like

Flutter channels:
master
dev
beta
stable

  1. In my instance the branch used was stable, for new and unrealeased features use dev or master flutter channel ChannelName

  2. Then type flutter upgrade to update changes in your project sdk

Here is a better explanation about the different branches in flutter

master

The current tip-of-tree, absolute latest cutting edge build. Usually functional, though sometimes we accidentally break things.

dev

The latest fully-tested build. Usually functional, but see Bad Builds for a list of known "bad" dev builds. We continually try to roll master to dev. Doing so involves running many more tests than those that we run during master development, which is why this is not actually the same to master.

beta

Every month, we pick the "best" dev build of the previous month or so, and promote it to beta. These builds have been tested with our codelabs.

stable

When we believe we have a particularly good build, we promote it to the stable channel. We intend to do this more or less every quarter, but this may vary. We recommend that you use this channel for all production app releases. We may ship hotfixes to the stable channel for high-priority bugs, although our intent is to do this rarely.

Top comments (0)