wip: not complete but still starting.

This commit is contained in:
ItzNotABug
2025-02-24 16:58:12 +05:30
parent ae3e6ea16d
commit e32da995a2
6 changed files with 35 additions and 12 deletions

View File

@@ -3,6 +3,7 @@ import 'dart:io';
import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:window_manager/window_manager.dart';
/// A utility class for initializing the Flutter application.
@@ -17,6 +18,7 @@ class AppInitializer {
/// and configures device orientation settings.
static initialize() async {
_ensureInitialized();
await _loadDotEnvVariables();
await _setupWindowDimensions();
await _setupDeviceOrientation();
}
@@ -26,6 +28,11 @@ class AppInitializer {
WidgetsFlutterBinding.ensureInitialized();
}
/// Ensures that Flutter bindings are initialized.
static _loadDotEnvVariables() async {
await dotenv.load(fileName: ".env");
}
/// Configures the window dimensions for desktop applications.
///
/// Ensures the window manager is initialized and sets a minimum window size.