main function

void main()

Implementation

void main() async {
  APP_START_TIME = DateTime.now();
  // nothing should go above this comment besides the DateTime check
  WidgetsFlutterBinding.ensureInitialized();
  Debug().init(); // ! no change this position
  FlutterError.onError = (FlutterErrorDetails details) {
    FlutterError.presentError.call(details);
    Debug().warn("${details.summary} ${details.context}");
  };
  // I LOVE THE THEN FUNCTION OH MY GOD HOLY SHIT, I LOVE THIS FUNCTION, WE SHOULD MAKE EVERYTHING WITH THIS FUNCTION
  runApp(LoadingAppViewScreen(task: _prepareAppLaunch()));
  if (Platform.I.isWindows) {
    // ig we only support windows, so extern/platform.dart is fucking useless LMAO
    await WindowManager.instance.ensureInitialized();
    await windowManager.setTitle(
        "2638 Scout \"$APP_CANONICAL_NAME\" (Build $REBEL_ROBOTICS_APP_VERSION)");
  }
  Debug().info("""
  \nBEGIN
  =========================================
  PROCESSOR_COUNT  = ${Platform.I.numberOfProcessors}
  VERSION          = ${Platform.I.version}
  OPERATING_SYSTEM = ${Platform.I.operatingSystem}
  BUILD_MODE       = ${Platform.I.buildMode}
  LOCALE           = ${Platform.I.locale}
  IO_SUPPORT       = ${Platform.I.isIO ? "NON_WEB" : "WEB"}
  DESIGN           = ${Platform.I.isMaterial ? "Material" : Platform.I.isCupertino ? "Cupertino" : "Unknown"}
  =========================================
  END
  """);
}