second commit

This commit is contained in:
2026-07-29 11:41:53 +05:30
parent fcccf22bac
commit d72522e737
211 changed files with 19260 additions and 0 deletions

37
lib/main.dart Normal file
View File

@@ -0,0 +1,37 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'app/app.dart';
import 'core/services/sound_service.dart';
import 'data/datasources/local_store.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await _configureChrome();
await LocalStore.instance.init();
await SoundService.instance.preload();
runApp(const ProviderScope(child: NearlePosApp()));
}
/// Locks the terminal into landscape and hides the system bars.
///
/// Both calls are Android/iOS only. On desktop the window manager owns sizing
/// and chrome, so we skip them — invoking them there is at best a no-op and can
/// raise a MissingPluginException on some engine builds.
Future<void> _configureChrome() async {
final isMobile = defaultTargetPlatform == TargetPlatform.android ||
defaultTargetPlatform == TargetPlatform.iOS;
if (kIsWeb || !isMobile) return;
await SystemChrome.setPreferredOrientations([
DeviceOrientation.landscapeLeft,
DeviceOrientation.landscapeRight,
]);
await SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky);
}