diff --git a/lib/main.dart b/lib/main.dart index 645974a7..f2e12729 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -178,41 +178,45 @@ class _MyApp extends State { ChangeNotifierProvider(create: (context) => PayfortViewModel()), ], child: Consumer( - builder: (context, projectProvider, child) => MaterialApp( - builder: (context, mchild) { - AppGlobal.projectViewModelContext = context; - return MediaQuery( - data: MediaQuery.of(context).copyWith( - textScaler: TextScaler.linear(1.0), - ), //set desired text scale factor here - child: mchild!); - // Container( - // color: Colors.blue, - // )); - }, - navigatorKey: locator().navigatorKey, - showSemanticsDebugger: false, - title: 'Dr. AlHabib', - locale: projectProvider.appLocal, - localizationsDelegates: [ - TranslationBaseDelegate(), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - GlobalCupertinoLocalizations.delegate, - ], - supportedLocales: [ - const Locale('ar', ''), // Arabic - const Locale('en', ''), // English - ], - - theme: Provider.of(context).getTheme(), - initialRoute: SPLASH, - // initialRoute: CALL_PAGE, - // initialRoute: OPENTOK_CALL_PAGE, - // initialRoute: PACKAGES_OFFERS, - // initialRoute: PACKAGES_ORDER_COMPLETED, - routes: routes, - debugShowCheckedModeBanner: false, + builder: (context, projectProvider, child) => SafeArea( + top: false, // Set to true if you want to avoid the notch area as well + bottom: Platform.isIOS ? false : true, + child: MaterialApp( + builder: (context, mchild) { + AppGlobal.projectViewModelContext = context; + return MediaQuery( + data: MediaQuery.of(context).copyWith( + textScaler: TextScaler.linear(1.0), + ), //set desired text scale factor here + child: mchild!); + // Container( + // color: Colors.blue, + // )); + }, + navigatorKey: locator().navigatorKey, + showSemanticsDebugger: false, + title: 'Dr. AlHabib', + locale: projectProvider.appLocal, + localizationsDelegates: [ + TranslationBaseDelegate(), + GlobalMaterialLocalizations.delegate, + GlobalWidgetsLocalizations.delegate, + GlobalCupertinoLocalizations.delegate, + ], + supportedLocales: [ + const Locale('ar', ''), // Arabic + const Locale('en', ''), // English + ], + + theme: Provider.of(context).getTheme(), + initialRoute: SPLASH, + // initialRoute: CALL_PAGE, + // initialRoute: OPENTOK_CALL_PAGE, + // initialRoute: PACKAGES_OFFERS, + // initialRoute: PACKAGES_ORDER_COMPLETED, + routes: routes, + debugShowCheckedModeBanner: false, + ), ), ), );