gascom/lib/main.dart
Abdullah Salah 216efb8a83 first commit
2024-12-25 11:09:55 +03:00

37 lines
1023 B
Dart

import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:gascom/constants/app_theme.dart';
import 'package:gascom/screens/log_in_screen.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await EasyLocalization.ensureInitialized();
const List<Locale> supportedLocales = [Locale("ar")];
runApp(EasyLocalization(
supportedLocales: supportedLocales,
path: 'assets/languages',
startLocale: const Locale("ar"),
fallbackLocale: const Locale("ar"),
saveLocale: true,
child: const MyApp(),
));
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Gascom',
debugShowCheckedModeBanner: false,
theme: AppTheme.theme,
localizationsDelegates: context.localizationDelegates,
supportedLocales: context.supportedLocales,
locale: context.locale,
home: const LogInScreen(),
);
}
}