-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Headlines and code unclear #13250
Copy link
Copy link
Open
Labels
from.page-issueReported in a reader-filed concernReported in a reader-filed concern
Description
Page URL
https://docs.flutter.dev/learn/pathway/tutorial/listenable-builder
Page source
Describe the problem
In the chapters
- Create the article view widget and
- Create the article view model
the code for class ArticleView is repeated twice and is identical but one line final viewModel = ArticleViewModel(ArticleModel());
should one code sample be ArticleWidget and the other ArticleView?
If not then having only one chapter might be better.
class ArticleView extends StatelessWidget {
ArticleView({super.key});
final viewModel = ArticleViewModel(ArticleModel()); // NEW in chapter view model
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Wikipedia Flutter'),
),
body: const Center(
child: Text('UI will update here'),
),
);
}
}Expected fix
Remove one chapter or add explanatory text.
Additional context
No response
I would like to fix this problem.
- I will try and fix this problem on docs.flutter.dev.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
from.page-issueReported in a reader-filed concernReported in a reader-filed concern