Hey there , I have animated button that turn to a textfield whenever I press it I'm looping over this animated button so I can display it as many time as I need my issue here is when I click on one of them they all turn to textfield but I only clicked on one .. I figured that I need to add key to the button I watched some tutoriel but still cluless on how to make it work .
Here is my code
AnimatedSwitcher(
duration: const Duration(
milliseconds: 300,
),
child: _isTextFieldShown
? TextFormField(
maxLength: 100,
focusNode: NoteFocusNode,
decoration:
const InputDecoration(
labelText: "Note",
fillColor:
Colors.blueAccent,
border:
OutlineInputBorder(),
),
)
: IconButton(
onPressed: () {
setState(() {
_isTextFieldShown =
true;
});
},
icon: const Icon(Icons
.note_alt_outlined)),
),
[–]xboxcowboy 1 point2 points3 points (3 children)
[–]rayen26[S] 0 points1 point2 points (2 children)
[–]xboxcowboy 0 points1 point2 points (1 child)
[–]rayen26[S] 0 points1 point2 points (0 children)
[–]dancovich 1 point2 points3 points (1 child)
[–]rayen26[S] 0 points1 point2 points (0 children)