fix: linux, flutter, workaround freeze (#10324)

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou 2024-12-20 09:24:08 +08:00 committed by GitHub
parent 7830a9e9f3
commit 9114743577
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 95 additions and 79 deletions

View file

@ -3625,3 +3625,16 @@ void checkUpdate() {
}
}
}
// https://github.com/flutter/flutter/issues/153560#issuecomment-2497160535
// For TextField, TextFormField
extension WorkaroundFreezeLinuxMint on Widget {
Widget workaroundFreezeLinuxMint() {
// No need to check if is Linux Mint, because this workaround is harmless on other platforms.
if (isLinux) {
return ExcludeSemantics(child: this);
} else {
return this;
}
}
}