File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,8 +74,8 @@ class _MyKeyExampleState extends State<MyKeyExample> {
7474 child: Focus (
7575 focusNode: _focusNode,
7676 onKey: _handleKeyEvent,
77- child: AnimatedBuilder (
78- animation : _focusNode,
77+ child: ListenableBuilder (
78+ listenable : _focusNode,
7979 builder: (BuildContext context, Widget ? child) {
8080 if (! _focusNode.hasFocus) {
8181 return GestureDetector (
Original file line number Diff line number Diff line change @@ -74,8 +74,8 @@ class _MyPhysicalKeyExampleState extends State<MyPhysicalKeyExample> {
7474 child: Focus (
7575 focusNode: _focusNode,
7676 onKey: _handleKeyEvent,
77- child: AnimatedBuilder (
78- animation : _focusNode,
77+ child: ListenableBuilder (
78+ listenable : _focusNode,
7979 builder: (BuildContext context, Widget ? child) {
8080 if (! _focusNode.hasFocus) {
8181 return GestureDetector (
Original file line number Diff line number Diff line change @@ -91,8 +91,8 @@ class _SaveButtonState extends State<SaveButton> {
9191
9292 @override
9393 Widget build (BuildContext context) {
94- return AnimatedBuilder (
95- animation : widget.valueNotifier,
94+ return ListenableBuilder (
95+ listenable : widget.valueNotifier,
9696 builder: (BuildContext context, Widget ? child) {
9797 return TextButton .icon (
9898 icon: const Icon (Icons .save),
@@ -146,8 +146,8 @@ class _ActionsExampleState extends State<ActionsExample> {
146146 Actions .invoke (context, ModifyIntent (++ count));
147147 },
148148 ),
149- AnimatedBuilder (
150- animation : model.data,
149+ ListenableBuilder (
150+ listenable : model.data,
151151 builder: (BuildContext context, Widget ? child) {
152152 return Padding (
153153 padding: const EdgeInsets .all (8.0 ),
Original file line number Diff line number Diff line change @@ -100,8 +100,8 @@ class _ShortcutsExampleState extends State<ShortcutsExample> {
100100 children: < Widget > [
101101 const Text ('Add to the counter by pressing the up arrow key' ),
102102 const Text ('Subtract from the counter by pressing the down arrow key' ),
103- AnimatedBuilder (
104- animation : model,
103+ ListenableBuilder (
104+ listenable : model,
105105 builder: (BuildContext context, Widget ? child) {
106106 return Text ('count: ${model .count }' );
107107 },
You can’t perform that action at this time.
0 commit comments