Skip to content

Commit 8f2c035

Browse files
committed
chore: simplify if condition in main() function
1 parent 882fd7a commit 8f2c035

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/main.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import 'constants/constants.dart';
1212
import 'logic/network/request.dart';
1313
import 'router/app_pages.dart';
1414
import 'utils/storage_util.dart';
15+
import 'utils/utils.dart';
1516

1617
void main() async {
1718
WidgetsFlutterBinding.ensureInitialized();
@@ -21,7 +22,7 @@ void main() async {
2122
DeviceOrientation.portraitDown,
2223
]);
2324

24-
if (Platform.isWindows || Platform.isLinux || Platform.isMacOS) {
25+
if (Utils.isDesktop) {
2526
await windowManager.ensureInitialized();
2627
WindowOptions windowOptions = WindowOptions(
2728
minimumSize: const Size(400, 700),

0 commit comments

Comments
 (0)