Skip to content

Commit

Permalink
Fix Indentation
Browse files Browse the repository at this point in the history
Merge pull request #2 from Betaco-Open/Indentation-
  • Loading branch information
vednig authored Apr 15, 2024
2 parents 6620053 + ca9027a commit 86684a6
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions Frontend/searchlight_gui/lib/main.dart
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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());
Expand Down Expand Up @@ -131,8 +130,10 @@ class MyHomePage extends StatefulWidget {
}

class _MyHomePageState extends State<MyHomePage> {
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();
Expand Down Expand Up @@ -191,14 +192,13 @@ class _MyHomePageState extends State<MyHomePage> {
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, [],
Expand Down

0 comments on commit 86684a6

Please sign in to comment.