The _iconSizeController was being accessed before it was initialized,… (#2541)
* The _iconSizeController was being accessed before it was initialized, initialized it in the initState method before _setSelected is called * generated --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
a3c74692c9
commit
cf2a5ace3a
1 changed files with 2 additions and 2 deletions
|
|
@ -65,13 +65,11 @@ class MessageTokenButtonState extends State<MessageTokenButton>
|
|||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_setSelected();
|
||||
|
||||
_controller = AnimationController(
|
||||
vsync: this,
|
||||
duration: const Duration(
|
||||
milliseconds: AppConfig.overlayAnimationDuration,
|
||||
// seconds: 5,
|
||||
),
|
||||
);
|
||||
|
||||
|
|
@ -93,6 +91,8 @@ class MessageTokenButtonState extends State<MessageTokenButton>
|
|||
CurvedAnimation(parent: _iconSizeController, curve: Curves.easeInOut),
|
||||
);
|
||||
|
||||
_setSelected(); // Call _setSelected after initializing _iconSizeController
|
||||
|
||||
_wasEmpty = _isEmpty;
|
||||
|
||||
if (!_isEmpty) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue