Refact. Flutter web, mid commit (#7494)

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2024-03-24 11:23:06 +08:00
committed by GitHub
parent 96e1b5b0f6
commit 85cafda168
33 changed files with 298 additions and 152 deletions

View File

@@ -469,7 +469,7 @@ class _DesktopHomePageState extends State<DesktopHomePage>
return buildInstallCard("", systemError, "", () {});
}
if (Platform.isWindows && !bind.isDisableInstallation()) {
if (isWindows && !bind.isDisableInstallation()) {
if (!bind.mainIsInstalled()) {
return buildInstallCard(
"", bind.isOutgoingOnly() ? "" : "install_tip", "Install",
@@ -485,7 +485,7 @@ class _DesktopHomePageState extends State<DesktopHomePage>
bind.mainUpdateMe();
});
}
} else if (Platform.isMacOS) {
} else if (isMacOS) {
if (!(bind.isOutgoingOnly() ||
bind.mainIsCanScreenRecording(prompt: false))) {
return buildInstallCard("Permissions", "config_screen", "Configure",
@@ -521,7 +521,7 @@ class _DesktopHomePageState extends State<DesktopHomePage>
// watchIsCanRecordAudio = true;
// });
// }
} else if (Platform.isLinux) {
} else if (isLinux) {
if (bind.isOutgoingOnly()) {
return Container();
}
@@ -570,7 +570,7 @@ class _DesktopHomePageState extends State<DesktopHomePage>
onPressed: () {
SystemNavigator.pop(); // Close the application
// https://github.com/flutter/flutter/issues/66631
if (Platform.isWindows) {
if (isWindows) {
exit(0);
}
},
@@ -740,7 +740,7 @@ class _DesktopHomePageState extends State<DesktopHomePage>
}
}
if (watchIsCanRecordAudio) {
if (Platform.isMacOS) {
if (isMacOS) {
Future.microtask(() async {
if ((await osxCanRecordAudio() ==
PermissionAuthorizeType.authorized)) {