-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed
Labels
a.tut.tutorialRelates to the Tutorial section of docs.flutter.devRelates to the Tutorial section of docs.flutter.deve0-minutesEffort: < 60 minEffort: < 60 minfrom.page-issueReported in a reader-filed concernReported in a reader-filed concernp2-mediumNecessary but not urgent concern. Resolve when possible.Necessary but not urgent concern. Resolve when possible.
Description
Page URL
https://docs.flutter.dev/learn/pathway/tutorial/listenable-builder
Page source
Describe the problem
I've noticed 2 mistakes while trying to follow this tutorial.
- The onPressed callback on the ArticlePage button should be 'onPressed'
- Remove the Flexible widget from within the SingleChildScrollView
Note: I am using a web server to test.
Expected fix
class ArticlePage extends StatelessWidget {
const ArticlePage({
super.key,
required this.summary,
required this.onPressed,
});
final Summary summary;
final VoidCallback onPressed;
@override
Widget build(BuildContext context) {
return SingleChildScrollView(
child: Column(
children: [
ArticleWidget(
summary: summary,
),
ElevatedButton(
onPressed: onPressed,
child: Text('Next random article'),
),
],
),
);
}
}
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
a.tut.tutorialRelates to the Tutorial section of docs.flutter.devRelates to the Tutorial section of docs.flutter.deve0-minutesEffort: < 60 minEffort: < 60 minfrom.page-issueReported in a reader-filed concernReported in a reader-filed concernp2-mediumNecessary but not urgent concern. Resolve when possible.Necessary but not urgent concern. Resolve when possible.