Page URL
https://docs.flutter.dev/learn/pathway/tutorial/listenable-builder
Page source
https://github.com/flutter/website/blob/main/src/content/learn/pathway/tutorial/listenable-builder.md
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.
Page URL
https://docs.flutter.dev/learn/pathway/tutorial/listenable-builder
Page source
https://github.com/flutter/website/blob/main/src/content/learn/pathway/tutorial/listenable-builder.md
Describe the problem
In the chapters
the code for
class ArticleViewis repeated twice and is identical but one linefinal viewModel = ArticleViewModel(ArticleModel());should one code sample be
ArticleWidgetand the otherArticleView?If not then having only one chapter might be better.
Expected fix
Remove one chapter or add explanatory text.
Additional context
No response
I would like to fix this problem.