You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
car_common_app/lib/main.dart

68 lines
2.2 KiB
Dart

import 'dart:io';
import 'package:logger/logger.dart';
Logger logger = Logger(printer: PrettyPrinter(printEmojis: false, colors: true, printTime: false));
// class MyHttpOverrides extends HttpOverrides {
// @override
// HttpClient createHttpClient(SecurityContext? context) {
// return super.createHttpClient(context)..badCertificateCallback = (X509Certificate cert, String host, int port) => true;
// }
// }
// Future<void> main() async {
// WidgetsFlutterBinding.ensureInitialized();
//
// await EasyLocalization.ensureInitialized();
// // AppState().setPostParamsInitConfig();
// HttpOverrides.global = MyHttpOverrides();
//
// runApp(
// EasyLocalization(
// supportedLocales: const <Locale>[
// Locale('en', 'US'),
// Locale('ar', 'SA'),
// ],
// path: 'resources',
// // assetLoader: const CodegenLoader(),
// child: const MyApp(),
// ),
// );
// }
// class MyApp extends StatelessWidget {
// const MyApp({super.key});
//
// @override
// Widget build(BuildContext context) {
// return LayoutBuilder(builder: (context, constraints) {
// return Sizer(
// builder: (
// BuildContext context,
// Orientation orientation,
// DeviceType deviceType,
// ) {
// List<LocalizationsDelegate<dynamic>> delegates = context.localizationDelegates;
// return MaterialApp(
// // key: navigatorKey,
// navigatorKey: navigatorKey,
// theme: AppTheme.getTheme(
// isArabic: EasyLocalization.of(context)?.locale.languageCode == "ar",
// ),
// debugShowCheckedModeBanner: false,
// localizationsDelegates: delegates,
// supportedLocales: context.supportedLocales,
// locale: context.locale,
// );
// },
// );
// });
// }
// }
// todo terminal command to genertate translation files
// flutter pub run easy_localization:generate --source-dir ./assets/langs
// todo terminal command to genertate translation keys
// flutter pub run easy_localization:generate --source-dir ./assets/langs -f keys -o locale_keys.g.dart
// command to generate languages data from json