Skip to content

Commit 2f7614a

Browse files
authored
[flutter_tools] modify Skeleton template to use ListenableBuilder instead of AnimatedBuilder (#128810)
Replaces AnimatedBuilder for ListenableBuilder in the skeleton template Fixes flutter/flutter#128801 No tests needed
1 parent bc49cd1 commit 2f7614a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/flutter_tools/templates/skeleton/lib/src/app.dart.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ class MyApp extends StatelessWidget {
2020
Widget build(BuildContext context) {
2121
// Glue the SettingsController to the MaterialApp.
2222
//
23-
// The AnimatedBuilder Widget listens to the SettingsController for changes.
23+
// The ListenableBuilder Widget listens to the SettingsController for changes.
2424
// Whenever the user updates their settings, the MaterialApp is rebuilt.
25-
return AnimatedBuilder(
26-
animation: settingsController,
25+
return ListenableBuilder(
26+
listenable: settingsController,
2727
builder: (BuildContext context, Widget? child) {
2828
return MaterialApp(
2929
// Providing a restorationScopeId allows the Navigator built by the

0 commit comments

Comments
 (0)