refactored and condensed technical documentation and comments across the codebase to improve readability
This commit is contained in:
@@ -114,12 +114,8 @@ class _ChatTextfieldState extends State<ChatTextfield> {
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
// Clear the published bar height only after this unmount completes. Setting
|
||||
// the shared notifier synchronously here fires its listener (the download
|
||||
// tray's AnimatedBuilder → setState) while the element tree is locked during
|
||||
// teardown, throwing "setState() called when widget tree was locked".
|
||||
// Running it at the end of the frame lets the reset land once the tree is
|
||||
// writable again; a newly opened chat re-publishes its own height afterwards.
|
||||
// Defer to end-of-frame: resetting the shared notifier synchronously during
|
||||
// teardown fires setState while the tree is locked ("widget tree was locked").
|
||||
WidgetsBinding.instance.addPostFrameCallback(
|
||||
(_) => downloadChipBottomObstruction.value = 0,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user