From 2f7614a818505e1eac4881a38e929355f9c6c15c Mon Sep 17 00:00:00 2001 From: fabiancrx <37002358+fabiancrx@users.noreply.github.com> Date: Thu, 6 Jul 2023 11:14:51 -0400 Subject: [PATCH] [flutter_tools] modify Skeleton template to use ListenableBuilder instead of AnimatedBuilder (#128810) Replaces AnimatedBuilder for ListenableBuilder in the skeleton template Fixes https://github.com/flutter/flutter/issues/128801 No tests needed --- .../flutter_tools/templates/skeleton/lib/src/app.dart.tmpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/flutter_tools/templates/skeleton/lib/src/app.dart.tmpl b/packages/flutter_tools/templates/skeleton/lib/src/app.dart.tmpl index 6f7ad23e37..7ba2c2f39d 100644 --- a/packages/flutter_tools/templates/skeleton/lib/src/app.dart.tmpl +++ b/packages/flutter_tools/templates/skeleton/lib/src/app.dart.tmpl @@ -20,10 +20,10 @@ class MyApp extends StatelessWidget { Widget build(BuildContext context) { // Glue the SettingsController to the MaterialApp. // - // The AnimatedBuilder Widget listens to the SettingsController for changes. + // The ListenableBuilder Widget listens to the SettingsController for changes. // Whenever the user updates their settings, the MaterialApp is rebuilt. - return AnimatedBuilder( - animation: settingsController, + return ListenableBuilder( + listenable: settingsController, builder: (BuildContext context, Widget? child) { return MaterialApp( // Providing a restorationScopeId allows the Navigator built by the