'What does the following error mean- No Scaffold widget found?

even i try to get alert dialog, this message always come

Error dialog



Solution 1:[1]

The error says that you have no Scaffold widget in your code. Put a Scaffold widget in your code and the error will be gone.

Your code (probably) will be like this:

body: //code

Instead of this, it should be like this:

return Scaffold( body: //code )

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 lightlessdays