When I wrote this code in Android Studio, that is what came up in my dart analysis toolbar:
The code I wrote
How do I prevent this?
Question posted in Android Studio
The official documentation can be found here.
The official documentation can be found here.
3
Answers
You are missing a
)
bracket add it before the semicolon .This link explains the about positional and named arguments . And The process you are trying is not a good practice. You need to breakdown the widgets so that it becomes easier to maintain.
Try as follows:
Add a bracket in the end before semicolon
Replace your
MaterialApp
with this:If you are using
AppBar
you have to giveScaffold.appBar
property likeScaffold(appBar:AppBar())
.For the image you have to use
Scaffold.body
property.