fix bug in LanguageToolTextField._textControllerListener - #100
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the _textControllerListener method in LanguageToolTextField to check if _scrollController has active clients before accessing its offset, which prevents potential runtime errors. The reviewer suggests refactoring the ternary operator used for side effects into a standard if statement to align with Dart's idiomatic style and improve readability.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
/gemini review |
andrew-bekhiet-solid
left a comment
There was a problem hiding this comment.
LGTM, just one small suggestion
There was a problem hiding this comment.
Code Review
This pull request updates the _textControllerListener in LanguageToolTextField to check if _scrollController has active clients before accessing its offset. The reviewer noted that because this listener is not unregistered upon disposal, it can still trigger after the widget is disposed, leading to an exception when checking hasClients. A suggestion was made to add a mounted check at the start of the listener to prevent this crash.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
No description provided.