From ca9027a5b6a7c8c9768c1603b708e04aeffb065d Mon Sep 17 00:00:00 2001 From: Ved Nig Date: Mon, 15 Apr 2024 23:38:26 +0530 Subject: [PATCH] Indentation --- Frontend/searchlight_gui/lib/main.dart | 48 +++++++++++++------------- 1 file changed, 24 insertions(+), 24 deletions(-) mode change 100644 => 100755 Frontend/searchlight_gui/lib/main.dart diff --git a/Frontend/searchlight_gui/lib/main.dart b/Frontend/searchlight_gui/lib/main.dart old mode 100644 new mode 100755 index c638951..1431020 --- a/Frontend/searchlight_gui/lib/main.dart +++ b/Frontend/searchlight_gui/lib/main.dart @@ -27,9 +27,9 @@ void main() async { await hotKeyManager.register( _hotKey, keyDownHandler: (hotKey) { - //--------<>------------- - //Enable when in Production - //--------<>-------------- + //--------<>------------- + //Enable when in Production + //--------<>-------------- if (appWindow.isVisible) { exit(0); } else { @@ -54,25 +54,24 @@ void main() async { //--------<>-------------- Window.enterFullscreen(); } - if( Platform.isLinux){ - WidgetsFlutterBinding.ensureInitialized(); - // Must add this line. + if (Platform.isLinux) { + WidgetsFlutterBinding.ensureInitialized(); + // Must add this line. - await windowManager.ensureInitialized(); + await windowManager.ensureInitialized(); // Window.enterFullscreen(); - await windowManager.setTitleBarStyle(TitleBarStyle.hidden); - await windowManager.setAsFrameless(); - await windowManager.maximize(); - - - // windowManager.waitUntilReadyToShow(windowOptions, () async { - // await windowManager.show(); - // await windowManager.focus(); - // }); - // windowManager.waitUntilReadyToShow().then((_) async{ - // await windowManager.setAsFrameless(); - // }); + await windowManager.setTitleBarStyle(TitleBarStyle.hidden); + await windowManager.setAsFrameless(); + await windowManager.maximize(); + + // windowManager.waitUntilReadyToShow(windowOptions, () async { + // await windowManager.show(); + // await windowManager.focus(); + // }); + // windowManager.waitUntilReadyToShow().then((_) async{ + // await windowManager.setAsFrameless(); + // }); } runApp(const MyApp()); @@ -131,8 +130,10 @@ class MyHomePage extends StatefulWidget { } class _MyHomePageState extends State { - var systemTempDir = - Directory((Platform.environment['HOME'] ?? Platform.environment['USERPROFILE']).toString() + '/Downloads'); + var systemTempDir = Directory( + (Platform.environment['HOME'] ?? Platform.environment['USERPROFILE']) + .toString() + + '/Downloads'); get contents => systemTempDir.listSync(recursive: true).map((e) => e.toString()).toList(); @@ -191,14 +192,13 @@ class _MyHomePageState extends State { String txt = text .replaceFirst('File: ', '') .replaceAll("'", ""); - print(txt); + // print(txt); if (Platform.isLinux) { appWindow.hide(); await Process.run("xdg-open", [ txt, ]); - exit(0);; - + exit(0); } else if (Platform.isWindows) { appWindow.hide(); await Process.run(txt, [],