diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 0e362021..3fd5a0ec 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -673,5 +673,6 @@ const Map> localizedValues = { }, "Book": {"en": "Book", "ar": "احجز"}, "AppointmentLabel": {"en": "Appointment", "ar": "موعد"}, + "BloodType": {"en": "Blood Type", "ar": "فصيلة الدم"}, }; diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index d2bfa4fa..17467dfb 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -7,7 +7,9 @@ import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:flutter/cupertino.dart'; import 'package:http/http.dart' as http; +import '../../../locator.dart'; import '../../../routes.dart'; +import '../AuthenticatedUserObject.dart'; AppSharedPreferences sharedPref = new AppSharedPreferences(); @@ -16,7 +18,8 @@ AppSharedPreferences sharedPref = new AppSharedPreferences(); /// onSuccess: (dynamic response, int statusCode) {}, /// onFailure: (String error, int statusCode) {}, /// body: Map(); - +/// +AuthenticatedUserObject authenticatedUserObject = locator(); class BaseAppClient { post(String endPoint, {Map body, @@ -114,11 +117,15 @@ class BaseAppClient { onFailure( parsed['ErrorEndUserMessage'] ?? parsed['ErrorMessage'], statusCode); - logout(); + } } else if (parsed['MessageStatus'] == 1 || parsed['SMSLoginRequired'] == true) { onSuccess(parsed, statusCode); + }else if (!parsed['IsAuthenticated']) { + await logout(); + + //helpers.showErrorToast('Your session expired Please login agian'); } else { if (parsed['SameClinicApptList'] != null) { onSuccess(parsed, statusCode); @@ -141,7 +148,8 @@ class BaseAppClient { logout() async { await sharedPref.remove(LOGIN_TOKEN_ID); - Navigator.of(AppGlobal.context).pushReplacementNamed(LOGIN_TYPE); + await authenticatedUserObject.getUser(); + Navigator.of(AppGlobal.context).pushReplacementNamed(HOME); } String getSessionId(String id) { diff --git a/lib/core/viewModels/project_view_model.dart b/lib/core/viewModels/project_view_model.dart index ea06c8ad..dce0fe54 100644 --- a/lib/core/viewModels/project_view_model.dart +++ b/lib/core/viewModels/project_view_model.dart @@ -10,19 +10,23 @@ import 'package:flutter_datetime_picker/flutter_datetime_picker.dart'; class ProjectViewModel extends BaseViewModel { AppSharedPreferences sharedPref = AppSharedPreferences(); - Locale _appLocale; - String currentLanguage = 'en'; + Locale _appLocale = Locale('ar'); + String currentLanguage = 'ar'; bool _isArabic = false; bool isInternetConnection = true; bool isLoading = false; bool isError = false; String error = ''; dynamic searchvalue; + dynamic get searchValue => searchvalue; + Locale get appLocal => _appLocale; - LocaleType get localeType => isArabic? LocaleType.en:LocaleType.ar; + LocaleType get localeType => isArabic ? LocaleType.en : LocaleType.ar; + bool get isArabic => _isArabic; + // BaseViewModel baseViewModel = locator() StreamSubscription subscription; @@ -48,11 +52,10 @@ class ProjectViewModel extends BaseViewModel { } void loadSharedPrefLanguage() async { - currentLanguage = await sharedPref.getString(APP_LANGUAGE); - _appLocale = Locale(currentLanguage ?? 'en'); - _isArabic = currentLanguage != null - ? currentLanguage == 'ar' ? true : false - : true; + currentLanguage = + await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); + _appLocale = Locale(currentLanguage); + _isArabic = currentLanguage == 'ar'; notifyListeners(); } diff --git a/lib/main.dart b/lib/main.dart index 24d44499..c5663640 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -67,7 +67,7 @@ class MyApp extends StatelessWidget { hintColor: Colors.grey[400], disabledColor: Colors.grey[300], errorColor: Color.fromRGBO(235, 80, 60, 1.0), - scaffoldBackgroundColor: HexColor('#E9E9E9'), // Colors.grey[100], + scaffoldBackgroundColor: Color(0xffEEEEEE), textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5), textSelectionHandleColor: Colors.grey, canvasColor: Colors.white, @@ -75,8 +75,7 @@ class MyApp extends StatelessWidget { highlightColor: Colors.grey[100].withOpacity(0.4), splashColor: Colors.transparent, primaryColor: Color(0xff40ACC9), - bottomSheetTheme: BottomSheetThemeData( - backgroundColor: HexColor('#E0E0E0')), + bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xffE0E0E0)), cursorColor: Colors.grey, iconTheme: IconThemeData(), appBarTheme: AppBarTheme( @@ -84,11 +83,11 @@ class MyApp extends StatelessWidget { brightness: Brightness.dark, elevation: 10.0, actionsIconTheme: IconThemeData( - color: Colors.grey[800], + color: Color(0xff40ACC9), ), ), ), - initialRoute: HOME, + initialRoute: SPLASH, routes: routes, debugShowCheckedModeBanner: false, ), diff --git a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart index aca0884f..109e4854 100644 --- a/lib/pages/BookAppointment/components/DocAvailableAppointments.dart +++ b/lib/pages/BookAppointment/components/DocAvailableAppointments.dart @@ -235,7 +235,7 @@ class _DocAvailableAppointmentsState extends State return children; }, ), - onDaySelected: (date, events) { + onDaySelected: (date, events,holidays) { _onDaySelected(date, events); _animationController.forward(from: 0.0); }, diff --git a/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart b/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart index 6e1a0182..043cd890 100644 --- a/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart +++ b/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart @@ -348,7 +348,7 @@ class _CovidTimeSlotsState extends State return children; }, ), - onDaySelected: (date, event) { + onDaySelected: (date, event,holidays) { _onDaySelected(date, event,); _animationController.forward(from: 0.0); }, diff --git a/lib/pages/landing/home_page.dart b/lib/pages/landing/home_page.dart index 37503b61..209d0f06 100644 --- a/lib/pages/landing/home_page.dart +++ b/lib/pages/landing/home_page.dart @@ -69,21 +69,9 @@ class _HomePageState extends State { 'assets/images/dq_home_page_bg_image.png'), fit: BoxFit.cover), ), - child: Stack( - children: [ - Positioned( - top: 15, - left: 5, - right: 5, - child: Container( - width: MediaQuery.of(context).size.width * 0.8, - child: Container(), - ), - ) - ], - ), + ), - Container(width: double.infinity, height: 125), + Container(width: double.infinity, height:projectViewModel.isArabic ? 120:110), ], ), Positioned( @@ -93,7 +81,7 @@ class _HomePageState extends State { child: (!model.isLogin && projectViewModel.user == null) ? Container( width: double.infinity, - height: 180, + height: 160, decoration: BoxDecoration( color: Theme.of(context).primaryColor, shape: BoxShape.rectangle, @@ -166,7 +154,7 @@ class _HomePageState extends State { ) : Container( width: double.infinity, - height: projectViewModel.isArabic?180: 150, + height: projectViewModel.isArabic ? 175: 160, decoration: BoxDecoration( color: Theme.of(context).primaryColor, shape: BoxShape.rectangle, @@ -274,7 +262,7 @@ class _HomePageState extends State { bold: true, ), Texts( - "Height", + TranslationBase.of(context).height, color: Colors.white, fontSize: 10, ), @@ -305,7 +293,7 @@ class _HomePageState extends State { ), Texts( - "Weight", + TranslationBase.of(context).weight, color: Colors.white, fontSize: 10, ) @@ -334,7 +322,7 @@ class _HomePageState extends State { color: Colors.white, ), Texts( - "Blood Type", + TranslationBase.of(context).bloodType, color: Colors.white, fontSize: 10, ) @@ -773,8 +761,7 @@ class DashboardItem extends StatelessWidget { ? DecorationImage( image: ExactAssetImage('assets/images/$imageName'), fit: BoxFit.cover, - colorFilter: new ColorFilter.mode( - Colors.black.withOpacity(opacity), BlendMode.dstIn), + colorFilter: new ColorFilter.mode(Colors.black.withOpacity(opacity), BlendMode.dstIn), ) : icon, ), diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart index 3c9c435c..e2562323 100644 --- a/lib/pages/landing/landing_page.dart +++ b/lib/pages/landing/landing_page.dart @@ -52,8 +52,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { ProjectViewModel projectProvider; ///inject the user data - AuthenticatedUserObject authenticatedUserObject = - locator(); + AuthenticatedUserObject authenticatedUserObject = locator(); final FirebaseMessaging _firebaseMessaging = FirebaseMessaging(); final authService = new AuthProvider(); @@ -374,11 +373,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { physics: NeverScrollableScrollPhysics(), controller: pageController, children: [ - HomePage( - goToMyProfile: () { - _changeCurrentTab(1); - }, - ), + HomePage(goToMyProfile: () {_changeCurrentTab(1);},), MedicalProfilePage(), BookingOptions(), Container(), diff --git a/lib/pages/medical/medical_profile_page.dart b/lib/pages/medical/medical_profile_page.dart index d9054cb9..86940594 100644 --- a/lib/pages/medical/medical_profile_page.dart +++ b/lib/pages/medical/medical_profile_page.dart @@ -62,18 +62,13 @@ class _MedicalProfilePageState extends State { Container( width: double.infinity, height: 210, - decoration: BoxDecoration( - image: DecorationImage( - image: ExactAssetImage( - 'assets/images/timeline_bg.png'), - fit: BoxFit.cover), - ), child: Stack( children: [ Image.asset( 'assets/images/timeline_bg.png', fit: BoxFit.cover, width: double.infinity, + // color: Colors.black.withOpacity(0.0) ), if(model.authenticatedUserObject.isLogin) ListView.builder( @@ -158,48 +153,52 @@ class _MedicalProfilePageState extends State { Navigator.push( context, FadePage( - page: HomePrescriptionsPage(), + page: DoctorHomePage(), ), ); }, child: MedicalProfileItem( title: TranslationBase.of(context) - .medicines, - imagePath: 'prescription_icon.png', + .myDoctor, + imagePath: 'doctor_icon.png', subTitle: TranslationBase.of(context) - .medicinesSubtitle, + .myDoctorSubtitle, ), ), ), Expanded( flex: 1, child: InkWell( - onTap: () => Navigator.push( - context, - FadePage( - page: VitalSignDetailsScreen(), - ), - ), + onTap: () { + Navigator.push( + context, + FadePage( + page: HomePrescriptionsPage(), + ), + ); + }, child: MedicalProfileItem( title: TranslationBase.of(context) - .vitalSigns, - imagePath: 'vital_signs.png', + .medicines, + imagePath: 'prescription_icon.png', subTitle: TranslationBase.of(context) - .vitalSignsSubtitle, + .medicinesSubtitle, ), ), ), Expanded( flex: 1, child: InkWell( - onTap: () => Navigator.push(context, - FadePage(page: ActiveMedicationsPage())), + onTap: () { + Navigator.push(context, + FadePage(page: InsuranceCard())); + }, child: MedicalProfileItem( title: TranslationBase.of(context) - .myMedical, - imagePath: 'active_medications.png', + .insurance, + imagePath: 'insurance_card_icon.png', subTitle: TranslationBase.of(context) - .myMedicalSubtitle, + .insuranceSubtitle, ), ), ), @@ -210,20 +209,12 @@ class _MedicalProfilePageState extends State { Expanded( flex: 1, child: InkWell( - onTap: () { - Navigator.push( - context, - FadePage( - page: DoctorHomePage(), - ), - ); - }, + onTap:()=> Navigator.push(context, FadePage(page: AllergiesPage())) , child: MedicalProfileItem( - title: TranslationBase.of(context) - .myDoctor, - imagePath: 'doctor_icon.png', + title: TranslationBase.of(context).allergies, + imagePath: 'my_allergies_icon.png', subTitle: TranslationBase.of(context) - .myDoctorSubtitle, + .allergiesSubtitle, ), ), ), @@ -234,13 +225,13 @@ class _MedicalProfilePageState extends State { Navigator.push( context, FadePage( - page: EyeMeasurementsPage())); + page: PatientSickLeavePage())); }, child: MedicalProfileItem( - title: TranslationBase.of(context).eye, - imagePath: 'eye_measurement_icon.png', + title: TranslationBase.of(context).sick, + imagePath: 'sick_leaves_icons.png', subTitle: TranslationBase.of(context) - .eyeSubtitle, + .sickSubtitle, ), ), ), @@ -249,82 +240,20 @@ class _MedicalProfilePageState extends State { child: InkWell( onTap: () { Navigator.push(context, - FadePage(page: InsuranceCard())); + FadePage(page: InsuranceApproval())); }, child: MedicalProfileItem( title: TranslationBase.of(context) - .insurance, - imagePath: 'insurance_card_icon.png', + .insuranceApproval, + imagePath: 'insurance_approvals_icon.png', subTitle: TranslationBase.of(context) - .insuranceSubtitle, + .insuranceApprovalSubtitle, ), ), ), ], ), Row(children: [ - Expanded( - flex: 1, - child: InkWell( - onTap: () { - Navigator.push(context, - FadePage(page: InsuranceUpdate())); - }, - child: MedicalProfileItem( - title: TranslationBase.of(context) - .updateInsurance, - imagePath: 'insurance_update_icon_.png', - subTitle: TranslationBase.of(context) - .updateInsuranceSubtitle, - ), - ), - ), - Expanded( - flex: 1, - child: InkWell( - onTap: () { - Navigator.push(context, - FadePage(page: InsuranceApproval())); - }, - child: MedicalProfileItem( - title: TranslationBase.of(context) - .insuranceApproval, - imagePath: 'insurance_approvals_icon.png', - subTitle: TranslationBase.of(context) - .insuranceApprovalSubtitle, - ), - ), - ), - Expanded( - flex: 1, - child: InkWell( - onTap:()=> Navigator.push(context, FadePage(page: AllergiesPage())) , - child: MedicalProfileItem( - title: TranslationBase.of(context).allergies, - imagePath: 'my_allergies_icon.png', - subTitle: TranslationBase.of(context) - .allergiesSubtitle, - ), - ), - ), - ]), - Row(children: [ - Expanded( - flex: 1, - child: InkWell( - onTap: () { - Navigator.push(context, - FadePage(page: MyVaccines())); - }, - child: MedicalProfileItem( - title: TranslationBase.of(context) - .myVaccines, - imagePath: 'my_vaccines_icon.png', - subTitle: TranslationBase.of(context) - .myVaccinesSubtitle, - ), - ), - ), Expanded( flex: 1, child: InkWell( @@ -334,164 +263,17 @@ class _MedicalProfilePageState extends State { }, child: MedicalProfileItem( title: - TranslationBase.of(context).medical, + TranslationBase.of(context).medical, imagePath: 'medical_reports_icon.png', subTitle: TranslationBase.of(context) .medicalSubtitle, ), ), ), - Expanded( - flex: 1, - child: InkWell( - onTap: () { - Navigator.push(context, - FadePage(page: MonthlyReportsPage())); - }, - child: MedicalProfileItem( - title: - TranslationBase.of(context).monthly, - imagePath: 'monthly_reports_icon.png', - subTitle: TranslationBase.of(context) - .monthlySubtitle, - ), - ), - ), - ]), - Row(children: [ - Expanded( - flex: 1, - child: InkWell( - onTap: () { - Navigator.push( - context, - FadePage( - page: PatientSickLeavePage())); - }, - child: MedicalProfileItem( - title: TranslationBase.of(context).sick, - imagePath: 'sick_leaves_icons.png', - subTitle: TranslationBase.of(context) - .sickSubtitle, - ), - ), - ), - Expanded( - flex: 1, - child: InkWell( - onTap: () { - Navigator.push(context, - FadePage(page: MyBalancePage())); - }, - child: MedicalProfileItem( - title: - TranslationBase.of(context).myBalance, - imagePath: 'check-in.png', - subTitle: TranslationBase.of(context) - .myBalanceSubtitle, - ), - ), - ), - Expanded( - flex: 1, - child: MedicalProfileItem( - title: - TranslationBase.of(context).patientCall, - imagePath: 'medical_history_icon.png', - subTitle: TranslationBase.of(context) - .patientCallSubtitle, - ), - ), - ]), - Row(children: [ - Expanded( - flex: 1, - child: InkWell( - //TODO - onTap: () { - Navigator.push( - context, FadePage(page: SmartWatchInstructions())); - }, - child: MedicalProfileItem( - title: TranslationBase.of(context) - .smartWatches, - imagePath: 'smartwatch_icon.png', - subTitle: TranslationBase.of(context) - .smartWatchesSubtitle, - ), - ), - ), - Expanded( - flex: 1, - child: InkWell( - onTap: () { - Navigator.push(context, - FadePage(page: MyTrackers())); - }, - child: MedicalProfileItem( - title: TranslationBase.of(context) - .myTrackers, - imagePath: 'my_tracker_icon.png', - subTitle: TranslationBase.of(context) - .myTrackersSubtitle, - ), - ), - ), - Expanded( - flex: 1, - child: InkWell( - onTap: (){ - Navigator.push(context, - FadePage(page: AskDoctorHomPage())); - }, - child: MedicalProfileItem( - title: TranslationBase.of(context).askYour, - imagePath: 'ask_doctor_icon.png', - subTitle: TranslationBase.of(context) - .askYourSubtitle, - ), - ), - ), - ]), - Row(children: [ - Expanded( - flex: 1, - child: InkWell( - //TODO -// onTap: () { -// Navigator.push( -// context, FadePage(page: DoctorHomePage())); -// }, - child: MedicalProfileItem( - title: - TranslationBase.of(context).internet, - imagePath: 'insurance_card_icon.png', - subTitle: TranslationBase.of(context) - .internetSubtitle, - ), - ), - ), - Expanded( - flex: 1, - child: InkWell( -// onTap: () { -// Navigator.push( -// context, FadePage(page: InsuranceApproval())); -// }, - child: MedicalProfileItem( - title: - TranslationBase.of(context).chatbot, - imagePath: 'insurance_approvals_icon.png', - subTitle: TranslationBase.of(context) - .chatbotSubtitle, - ), - ), - ), - Expanded( - flex: 1, - child: Container(), - ), + Expanded(child: Container(),), + Expanded(child: Container(),), ]), + SizedBox(height: MediaQuery.of(context).size.height * 0.12,) ], ), @@ -529,6 +311,7 @@ class _MedicalProfilePageState extends State { " " + model.user.lastName, color: Colors.white, + bold: true, ), Texts( diff --git a/lib/routes.dart b/lib/routes.dart index ada7c54c..8a0619e6 100644 --- a/lib/routes.dart +++ b/lib/routes.dart @@ -13,9 +13,11 @@ import 'package:diplomaticquarterapp/pages/family/add-family-member.dart'; import 'package:diplomaticquarterapp/pages/symptom-checker/info.dart'; import 'package:diplomaticquarterapp/pages/symptom-checker/select-gender.dart'; import 'package:diplomaticquarterapp/pages/symptom-checker/symtom-checker.dart'; +import 'package:diplomaticquarterapp/splashPage.dart'; const String INIT_ROUTE = '/'; -const String HOME = '/'; +const String HOME = 'home'; +const String SPLASH = '/'; const String LOGIN = 'login'; const String WELCOME_LOGIN = 'welcome-login'; const String LOGIN_TYPE = 'login-type'; @@ -32,6 +34,7 @@ const String SYMPTOM_CHECKER = 'symptom-checker'; const String SYMPTOM_CHECKER_INFO = 'symptom-checker-info'; const String SELECT_GENDER = 'select-gender'; var routes = { + SPLASH: (_) => SplashScreen(), HOME: (_) => LandingPage(), WELCOME_LOGIN: (_) => WelcomeLogin(), LOGIN_TYPE: (_) => LoginType(), diff --git a/lib/splashPage.dart b/lib/splashPage.dart new file mode 100644 index 00000000..ceec604c --- /dev/null +++ b/lib/splashPage.dart @@ -0,0 +1,36 @@ +import 'dart:async'; +import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; +import 'package:flutter/material.dart'; + +class SplashScreen extends StatefulWidget { + @override + _SplashScreenState createState() => _SplashScreenState(); +} + +class _SplashScreenState extends State { + @override + void initState() { + super.initState(); + Timer( + Duration(seconds: 3), + () => Navigator.of(context).pushReplacement( + MaterialPageRoute( + builder: (BuildContext context) => LandingPage(), + ), + ), + ); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.white, + body: Center( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Image.asset('assets/images/DQ/DQ_logo.png'), + ), + ), + ); + } +} diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 62754d6f..75c00f27 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -730,6 +730,7 @@ class TranslationBase { String get yearOld => localizedValues['years-old'][locale.languageCode]; String get book => localizedValues['Book'][locale.languageCode]; String get appointmentLabel => localizedValues['AppointmentLabel'][locale.languageCode]; + String get bloodType => localizedValues['BloodType'][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/widgets/buttons/secondary_button.dart b/lib/widgets/buttons/secondary_button.dart index dc794f7b..e14ec584 100644 --- a/lib/widgets/buttons/secondary_button.dart +++ b/lib/widgets/buttons/secondary_button.dart @@ -18,7 +18,7 @@ class SecondaryButton extends StatefulWidget { this.label = "", this.icon, this.iconOnly = false, - this.color:const Color.fromRGBO(63, 72, 74, 1), + this.color , this.textColor, this.onTap, this.loading: false, @@ -185,7 +185,7 @@ class _SecondaryButtonState extends State height: MediaQuery.of(context).size.width * 2.2, decoration: BoxDecoration( shape: BoxShape.circle, - color: widget.color, + color: widget.color?? Theme.of(context).primaryColor, ), ), ), diff --git a/lib/widgets/data_display/medical/time_line_widget.dart b/lib/widgets/data_display/medical/time_line_widget.dart index 5623cf56..ebac57d2 100644 --- a/lib/widgets/data_display/medical/time_line_widget.dart +++ b/lib/widgets/data_display/medical/time_line_widget.dart @@ -1,3 +1,4 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/AppointmentDetails.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; @@ -6,6 +7,7 @@ import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; class TimeLineWidget extends StatelessWidget { final bool isUp; @@ -15,6 +17,7 @@ class TimeLineWidget extends StatelessWidget { @override Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); return Stack( children: [ Container( @@ -24,14 +27,14 @@ class TimeLineWidget extends StatelessWidget { child: Center( child: Divider( color: Colors.white, - height: 3, - thickness: 3, + height: 2, + thickness: 2, ), ), ), if (isUp) Positioned( - top: 15, + top: projectViewModel.isArabic ? 15 : 18, child: Container( margin: EdgeInsets.only(left: 2, right: 2), child: Column( @@ -58,15 +61,15 @@ class TimeLineWidget extends StatelessWidget { ), Container( height: 20, - width: 3, + width: 2, color: Colors.white, ), Container( width: 15, height: 15, decoration: BoxDecoration( - color: Colors.yellow[700], - border: Border.all(color: Colors.yellow[700], width: 2), + color: Theme.of(context).primaryColor, + border: Border.all(color: Theme.of(context).primaryColor, width: 2), shape: BoxShape.rectangle, borderRadius: BorderRadius.all( Radius.circular(25.0), @@ -90,7 +93,7 @@ class TimeLineWidget extends StatelessWidget { ) else Positioned( - top: 65, + top:projectViewModel.isArabic ? 63 : 70, child: Container( margin: EdgeInsets.only(left: 2, right: 2), child: Column( @@ -110,8 +113,8 @@ class TimeLineWidget extends StatelessWidget { width: 15, height: 15, decoration: BoxDecoration( - color: Colors.yellow[700], - border: Border.all(color: Colors.yellow[700], width: 2), + color: Theme.of(context).primaryColor, + border: Border.all(color: Theme.of(context).primaryColor, width: 2), shape: BoxShape.rectangle, borderRadius: BorderRadius.all( Radius.circular(25.0), @@ -120,7 +123,7 @@ class TimeLineWidget extends StatelessWidget { ), Container( height: 20, - width: 3, + width: 2, color: Colors.white, ), LargeAvatar( diff --git a/lib/widgets/others/arrow_back.dart b/lib/widgets/others/arrow_back.dart index 619f4f41..f20e060f 100644 --- a/lib/widgets/others/arrow_back.dart +++ b/lib/widgets/others/arrow_back.dart @@ -16,11 +16,7 @@ class ArrowBack extends StatelessWidget { onTap: Feedback.wrapForTap(() { onTap != null ? onTap() : Navigator.pop(context); }, context), - child: Icon( - projectViewModel.isArabic - ? Icons.arrow_forward_ios - : Icons.arrow_back_ios, - color: Colors.white), + child: Icon(Icons.arrow_back_ios, color: Colors.white), ); } } diff --git a/lib/widgets/others/not_auh_page.dart b/lib/widgets/others/not_auh_page.dart index dddf3991..8f8ed729 100644 --- a/lib/widgets/others/not_auh_page.dart +++ b/lib/widgets/others/not_auh_page.dart @@ -46,8 +46,8 @@ class NotAutPage extends StatelessWidget { height: MediaQuery.of(context).size.height * 0.55, width: MediaQuery.of(context).size.width * 0.50, child: Image.asset(projectViewModel.isArabic - ? 'assets/images/wifi-EN.png' - : 'assets/images/Wifi-AR.png'), + ? 'assets/images/Wifi-AR.png' + : 'assets/images/wifi-EN.png'), ), ), SizedBox(