34 lines
1.2 KiB
Dart
34 lines
1.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_localizations/flutter_localizations.dart';
|
|
import 'package:get/get.dart';
|
|
import 'package:sigap/splash_screen.dart';
|
|
import 'package:sigap/src/cores/bindings/app_bindings.dart';
|
|
import 'package:sigap/src/cores/routes/app_pages.dart';
|
|
import 'package:sigap/src/utils/constants/text_strings.dart';
|
|
import 'package:sigap/src/utils/theme/theme.dart';
|
|
|
|
class App extends StatelessWidget {
|
|
const App({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
// Initialize bindings explicitly first
|
|
final bindings = AppBindings();
|
|
bindings.dependencies();
|
|
|
|
return GetMaterialApp(
|
|
title: TTexts.appName,
|
|
themeMode: ThemeMode.system, // This will follow system theme settings
|
|
theme: TAppTheme.lightTheme,
|
|
darkTheme: TAppTheme.darkTheme,
|
|
debugShowCheckedModeBanner: false,
|
|
// Still keep initialBinding for any controllers that rely on it
|
|
initialBinding: bindings,
|
|
localizationsDelegates: GlobalMaterialLocalizations.delegates,
|
|
supportedLocales: const [Locale('id', '')],
|
|
getPages: AppPages.routes,
|
|
home: const AnimatedSplashScreenWidget(),
|
|
);
|
|
}
|
|
}
|