Skip to content

Error when adding AppBar, tutorial code suddenly not matching previous step. #13431

@Sidewinder1138

Description

@Sidewinder1138

Page URL

https://docs.flutter.dev/learn/pathway/tutorial/layout

Page source

https://github.com/flutter/website/blob/main/sites/docs/src/content/learn/pathway/tutorial/layout.md

Describe the problem

In the previous step of this tutorial (3) we added a little Tile StatelessWidget. There was also no existing AppBar.
In this step, suddenly we are back to "Hello World".
Also, when I go to add the AppBar, I get an error about "The constructor being called isn't a const constructor."
This is pretty jarring/confusing for beginners. Probably an easy fix, but I don't know enough to contribute yet.

Expected fix

As you go through the steps of the tutorial, things shouldn't suddenly change on you!
If this is a common "gotcha" regarding const, please add a box explaining how to resolve it.

Additional context

No response

I would like to fix this problem.

  • I will try and fix this problem on docs.flutter.dev.

Metadata

Metadata

Assignees

No one assigned

    Labels

    from.page-issueReported in a reader-filed concern

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions