// ignore_for_file: unused_import
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:kmobile/features/security/security_error_screen.dart';
import 'package:kmobile/security/security_service.dart';
import 'di/injection.dart';
import 'app.dart';

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

  await SystemChrome.setPreferredOrientations([
    DeviceOrientation.portraitUp,
    DeviceOrientation.portraitDown,
  ]);

  // Check for device compromise
  //  final compromisedMessage = await SecurityService.deviceCompromisedMessage;
  // if (compromisedMessage != null) {
  //   runApp(MaterialApp(
  //     home: SecurityErrorScreen(message: compromisedMessage),
  //   ));
  //   return;
  // }
  await setupDependencies();
  runApp(const KMobile());
}