# main function

void main()

## Implementation

    void main() async {
      WidgetsFlutterBinding.ensureInitialized();

      // if it's not on the web, windows or android, load the accent color
      if (!kIsWeb &&
          [
            TargetPlatform.windows,
            TargetPlatform.android,
          ].contains(defaultTargetPlatform)) {
        SystemTheme.accentColor.load();
      }

      if (isDesktop) {
        await flutter_acrylic.Window.initialize();
        await flutter_acrylic.Window.hideWindowControls();
        await WindowManager.instance.ensureInitialized();
        windowManager.waitUntilReadyToShow().then((_) async {
          await windowManager.setTitleBarStyle(
            TitleBarStyle.hidden,
            windowButtonVisibility: false,
          );
          await windowManager.setMinimumSize(const Size(574, 450));
          await windowManager.setSize(const Size(700, 500));
          await windowManager.show();
          await windowManager.setPreventClose(true);
          await windowManager.setSkipTaskbar(false);
        });
      }

      // Init logging
      initLogging();
      initPrefs();

      // Error logging
      FlutterError.onError = (details) {
        FlutterError.presentError(details);
        logError(details.exception, details.stack, details.library);
      };
      PlatformDispatcher.instance.onError = (error, stack) {
        logError(error, stack, null);
        return true;
      };

      // Set version
      await PackageInfo.fromPlatform().then((PackageInfo packageInfo) {
        currentVersion = packageInfo.version;
      });

      // Init app
      runApp(const WSLManager());
    }