From 53abc9001016076404c6b88831239e5e71b760a7 Mon Sep 17 00:00:00 2001 From: molulan Date: Fri, 20 Mar 2026 09:20:29 +0100 Subject: [PATCH] Move section "update your app to include the article view" earlier Move the section up to just after creating the ArticleView widget. This way it's possible to follow the changes visually in the app. Which is more motivating when following along the tutorial --- .../pathway/tutorial/listenable-builder.md | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/content/learn/pathway/tutorial/listenable-builder.md b/src/content/learn/pathway/tutorial/listenable-builder.md index 8da714f918..1ed2b69ba1 100644 --- a/src/content/learn/pathway/tutorial/listenable-builder.md +++ b/src/content/learn/pathway/tutorial/listenable-builder.md @@ -80,6 +80,29 @@ class ArticleView extends StatelessWidget { } ``` +### Update your app to include the article view + +Connect everything together by updating your `MainApp` to +include your completed `ArticleView`. + +Replace your existing `MainApp` with this updated version: + +```dart +class MainApp extends StatelessWidget { + const MainApp({super.key}); + + @override + Widget build(BuildContext context) { + return MaterialApp( + home: ArticleView(), + ); + } +} +``` + +This change switches from the console-based test to the full UI +experience with proper state management. + ### Listen for state changes Wrap your UI in a [`ListenableBuilder`][] to listen for state changes, @@ -399,29 +422,6 @@ This widget demonstrates a few important UI concepts: - **Overflow handling**: `TextOverflow.ellipsis` prevents text from breaking the layout. -### Update your app to include the article view - -Connect everything together by updating your `MainApp` to -include your completed `ArticleView`. - -Replace your existing `MainApp` with this updated version: - -```dart -class MainApp extends StatelessWidget { - const MainApp({super.key}); - - @override - Widget build(BuildContext context) { - return MaterialApp( - home: ArticleView(), - ); - } -} -``` - -This change switches from the console-based test to the full UI -experience with proper state management. - ### Run the complete app Hot reload your app one final time. You should now see: