37 lines
1023 B
Dart
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(),
|
|
);
|
|
}
|
|
} |