diff --git a/lib/locator.dart b/lib/locator.dart index 7830e395..c871b67e 100644 --- a/lib/locator.dart +++ b/lib/locator.dart @@ -207,7 +207,6 @@ void setupLocator() { locator.registerLazySingleton(() => OrderDetailsService()); locator.registerLazySingleton(() => CustomerAddressesService()); // locator.registerLazySingleton(() => TermsConditionService()); - locator.registerLazySingleton(() => PrivilegeService()); locator.registerLazySingleton(() => TermsConditionService()); locator.registerLazySingleton(() => CancelOrderService()); locator.registerLazySingleton(() => PrivilegeService()); diff --git a/lib/pages/DrawerPages/family/add-family_type.dart b/lib/pages/DrawerPages/family/add-family_type.dart index 33e39397..96e055b3 100644 --- a/lib/pages/DrawerPages/family/add-family_type.dart +++ b/lib/pages/DrawerPages/family/add-family_type.dart @@ -27,7 +27,7 @@ class AddFamilyMemberType extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Image.asset( - 'assets/images/DQ/dq_logo_icon.png', + 'assets/images/habib-logo.png', height: 80, width: 80, ), diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart index 646158db..44adc10e 100644 --- a/lib/pages/login/confirm-login.dart +++ b/lib/pages/login/confirm-login.dart @@ -109,7 +109,7 @@ class _ConfirmLogin extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Image.asset( - 'assets/images/DQ/dq_logo_icon.png', + 'assets/images/habib-logo.png', height: 90, width: 90, ), @@ -173,7 +173,7 @@ class _ConfirmLogin extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Image.asset( - 'assets/images/DQ/dq_logo_icon.png', + 'assets/images/habib-logo.png', height: 90, width: 90, ), @@ -510,8 +510,7 @@ class _ConfirmLogin extends State { .then((result) => { if (result is Map) { - projectViewModel.setPrivilege(privilegeList: result), - result = CheckActivationCode.fromJson(result), + result = CheckActivationCode.fromJson(result), if (this.registerd_data != null && this.registerd_data.isRegister == true) { @@ -582,8 +581,7 @@ class _ConfirmLogin extends State { }); } - goToHome() async { - await authenticatedUserObject.getUser(getUser: true); + goToHome() { authenticatedUserObject.isLogin = true; appointmentRateViewModel.isLogin = true; projectViewModel.isLogin = true; @@ -634,11 +632,10 @@ class _ConfirmLogin extends State { return InkWell( onTap: () => {authenticateUser(4, true)}, child: RoundedContainer( - height: 140, borderColor: Colors.grey, showBorder: true, child: Padding( - padding: EdgeInsets.fromLTRB(5, 15, 5, 15), + padding: EdgeInsets.fromLTRB(30, 15, 30, 15), child: Column( children: [ Image.asset( @@ -661,11 +658,10 @@ class _ConfirmLogin extends State { return InkWell( onTap: () => {authenticateUser(1, true)}, child: RoundedContainer( - height: 140, borderColor: Colors.grey, showBorder: true, child: Padding( - padding: EdgeInsets.fromLTRB(5, 15, 5, 15), + padding: EdgeInsets.fromLTRB(30, 15, 30, 15), child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ @@ -676,16 +672,14 @@ class _ConfirmLogin extends State { ), projectViewModel.isArabic ? SizedBox( - height: 20, + height: 0, ) : SizedBox( height: 20, ), AppText( TranslationBase.of(context).verifySMS, - fontSize: projectViewModel.isArabic - ? SizeConfig.textMultiplier * 1.8 - : SizeConfig.textMultiplier * 2, + fontSize: SizeConfig.textMultiplier * 2, textAlign: TextAlign.center, ) ], @@ -696,14 +690,13 @@ class _ConfirmLogin extends State { return InkWell( onTap: () => {authenticateUser(2, BiometricType.fingerprint.index)}, child: RoundedContainer( - height: 140, backgroundColor: BiometricType.fingerprint.index == 1 ? Colors.white : Colors.white.withOpacity(.7), borderColor: Colors.grey, showBorder: true, child: Padding( - padding: EdgeInsets.fromLTRB(5, 15, 5, 15), + padding: EdgeInsets.fromLTRB(30, 15, 30, 15), child: Column( children: [ Image.asset( @@ -726,14 +719,13 @@ class _ConfirmLogin extends State { return InkWell( onTap: () => {authenticateUser(3, BiometricType.face.index)}, child: RoundedContainer( - height: 140, backgroundColor: checkIfBiometricAvailable(BiometricType.face) ? Colors.white : Colors.white.withOpacity(.7), borderColor: Colors.grey, showBorder: true, child: Padding( - padding: EdgeInsets.fromLTRB(5, 15, 5, 15), + padding: EdgeInsets.fromLTRB(30, 15, 30, 15), child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ @@ -762,14 +754,13 @@ class _ConfirmLogin extends State { }) }, child: RoundedContainer( - height: 140, backgroundColor: BiometricType.fingerprint.index == 1 ? Colors.white : Colors.white.withOpacity(.7), borderColor: Colors.grey, showBorder: true, child: Padding( - padding: EdgeInsets.fromLTRB(5, 15, 5, 15), + padding: EdgeInsets.fromLTRB(0, 0, 0, 5), child: Column( children: [ Image.asset( @@ -782,7 +773,7 @@ class _ConfirmLogin extends State { height: 15, ) : SizedBox( - height: 10, + height: 20, ), AppText( TranslationBase.of(context).moreVerification, diff --git a/lib/widgets/others/app_scaffold_pharmacy_widget.dart b/lib/widgets/others/app_scaffold_pharmacy_widget.dart index e92ff17a..d818628e 100644 --- a/lib/widgets/others/app_scaffold_pharmacy_widget.dart +++ b/lib/widgets/others/app_scaffold_pharmacy_widget.dart @@ -8,8 +8,7 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/others/bottom_bar.dart'; import 'package:diplomaticquarterapp/widgets/progress_indicator/app_loader_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; -import 'package:diplomaticquarterapp/widgets/robo-search/robosearch.dart'; -import 'package:diplomaticquarterapp/widgets/robo-search/search.dart'; + import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; @@ -38,22 +37,22 @@ class PharmacyAppScaffold extends StatelessWidget { final Color backgroundColor; AuthenticatedUserObject authenticatedUserObject = - locator(); + locator(); PharmacyAppScaffold( {@required this.body, - this.appBarTitle = '', - this.isLoading = false, - this.isShowAppBar = false, - this.hasAppBarParam, - this.bottomSheet, - this.baseViewModel, - this.floatingActionButton, - this.title, - this.description, - this.isShowDecPage = true, - this.isBottomBar, - this.backgroundColor}); + this.appBarTitle = '', + this.isLoading = false, + this.isShowAppBar = false, + this.hasAppBarParam, + this.bottomSheet, + this.baseViewModel, + this.floatingActionButton, + this.title, + this.description, + this.isShowDecPage = true, + this.isBottomBar, + this.backgroundColor}); @override Widget build(BuildContext context) { @@ -61,38 +60,38 @@ class PharmacyAppScaffold extends StatelessWidget { return Scaffold( backgroundColor: - backgroundColor ?? Theme.of(context).scaffoldBackgroundColor, + backgroundColor ?? Theme.of(context).scaffoldBackgroundColor, appBar: isShowAppBar ? AppBar( - elevation: 0, - backgroundColor: Color(0xff5AB145), - textTheme: TextTheme( - headline6: - TextStyle(color: Colors.white, fontWeight: FontWeight.bold), - ), - title: Text(authenticatedUserObject.isLogin - ? appBarTitle.toUpperCase() - : TranslationBase.of(context).serviceInformationTitle), - leading: Builder( - builder: (BuildContext context) { - return ArrowBack(); - }, - ), - centerTitle: true, - actions: [], - ) + elevation: 0, + backgroundColor: Color(0xff5AB145), + textTheme: TextTheme( + headline6: + TextStyle(color: Colors.white, fontWeight: FontWeight.bold), + ), + title: Text(authenticatedUserObject.isLogin + ? appBarTitle.toUpperCase() + : TranslationBase.of(context).serviceInformationTitle), + leading: Builder( + builder: (BuildContext context) { + return ArrowBack(); + }, + ), + centerTitle: true, + actions: [], + ) : null, body: (!authenticatedUserObject.isLogin && isShowDecPage) ? NotAutPage( - title: appBarTitle, - description: description, - ) + title: appBarTitle, + description: description, + ) : baseViewModel != null - ? NetworkBaseView( - child: buildBodyWidget(), - baseViewModel: baseViewModel, - ) - : buildBodyWidget(), + ? NetworkBaseView( + child: buildBodyWidget(), + baseViewModel: baseViewModel, + ) + : buildBodyWidget(), bottomSheet: bottomSheet, floatingActionButton: floatingActionButton ?? floatingActionButton, // bottomNavigationBar: diff --git a/lib/widgets/others/app_scafold_detail_page.dart b/lib/widgets/others/app_scafold_detail_page.dart index ed8bc8a7..9960b1d1 100644 --- a/lib/widgets/others/app_scafold_detail_page.dart +++ b/lib/widgets/others/app_scafold_detail_page.dart @@ -12,8 +12,6 @@ import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/bottom_bar.dart'; import 'package:diplomaticquarterapp/widgets/progress_indicator/app_loader_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; -import 'package:diplomaticquarterapp/widgets/robo-search/robosearch.dart'; -import 'package:diplomaticquarterapp/widgets/robo-search/search.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; @@ -49,27 +47,26 @@ class DetailPageScafold extends StatefulWidget { final List appBarIcons; final PreferredSizeWidget appBarWidget; - DetailPageScafold( {@required this.body, - this.appBarTitle = '', - this.isLoading = false, - this.isShowAppBar = false, - this.hasAppBarParam, - this.bottomSheet, - this.baseViewModel, - this.floatingActionButton, - this.isPharmacy = false, - this.title, - this.description, - this.isShowDecPage = true, - this.isBottomBar, - this.backgroundColor, - this.preferredSize = 0.0, - this.appBarIcons, - this.appBarWidget, - this.image, - this.infoList}); + this.appBarTitle = '', + this.isLoading = false, + this.isShowAppBar = false, + this.hasAppBarParam, + this.bottomSheet, + this.baseViewModel, + this.floatingActionButton, + this.isPharmacy = false, + this.title, + this.description, + this.isShowDecPage = true, + this.isBottomBar, + this.backgroundColor, + this.preferredSize = 0.0, + this.appBarIcons, + this.appBarWidget, + this.image, + this.infoList}); @override _DetailPageScafoldState createState() => _DetailPageScafoldState(); @@ -77,7 +74,7 @@ class DetailPageScafold extends StatefulWidget { class _DetailPageScafoldState extends State { AuthenticatedUserObject authenticatedUserObject = - locator(); + locator(); @override Widget build(BuildContext context) { @@ -96,29 +93,29 @@ class _DetailPageScafoldState extends State { appBar = widget.preferredSize == 0 ? appBarWidget : PreferredSize( - child: appBarWidget, - preferredSize: Size.fromHeight(widget.preferredSize)); + child: appBarWidget, + preferredSize: Size.fromHeight(widget.preferredSize)); } else { appBar = this.widget.appBarWidget; } return Scaffold( backgroundColor: - widget.backgroundColor ?? Theme.of(context).scaffoldBackgroundColor, + widget.backgroundColor ?? Theme.of(context).scaffoldBackgroundColor, appBar: appBar, body: (!Provider.of(context, listen: false).isLogin && - widget.isShowDecPage) + widget.isShowDecPage) ? NotAutPage( - title: widget.appBarTitle, - description: widget.description, - infoList: widget.infoList, - ) + title: widget.appBarTitle, + description: widget.description, + infoList: widget.infoList, + ) : widget.baseViewModel != null - ? NetworkBaseView( - child: buildBodyWidget(), - baseViewModel: widget.baseViewModel, - ) - : buildBodyWidget(), + ? NetworkBaseView( + child: buildBodyWidget(), + baseViewModel: widget.baseViewModel, + ) + : buildBodyWidget(), bottomSheet: widget.bottomSheet, //floatingActionButton: floatingActionButton ?? floatingActionButton, // bottomNavigationBar: @@ -141,7 +138,7 @@ class _DetailPageScafoldState extends State { class AppBarWidget extends StatelessWidget with PreferredSizeWidget { final AuthenticatedUserObject authenticatedUserObject = - locator(); + locator(); final String appBarTitle; final List appBarIcons; @@ -161,81 +158,79 @@ class AppBarWidget extends StatelessWidget with PreferredSizeWidget { Widget buildAppBar(BuildContext context) { return isShowAppBar ? AppBar( - elevation: 0, - backgroundColor:Colors.white, + elevation: 0, + backgroundColor: Colors.white, // isPharmacy ? Colors.green : Theme.of(context).appBarTheme.color, - textTheme: TextTheme( - headline6: - TextStyle(color: Colors.white, fontWeight: FontWeight.bold), - ), - title: Texts( - authenticatedUserObject.isLogin || !isShowDecPage - ? appBarTitle.toUpperCase() - : TranslationBase.of(context).serviceInformationTitle, - color: Colors.white, - bold: true, - ), - leading: Builder( - builder: (BuildContext context) { - return GestureDetector( - - behavior: HitTestBehavior.opaque, - onTap:()=> Navigator.pop(context), - child: Icon(Icons.arrow_back_ios, color: Colors.grey), - ); - }, - ), - centerTitle: true, - actions: [ - isPharmacy - ? IconButton( - icon: Icon(Icons.shopping_cart), - color: Colors.grey, - onPressed: () { - Navigator.push( - context, - MaterialPageRoute(builder: (context) => CartOrderPage()), - ); -// Navigator.of(context) -// .popUntil(ModalRoute.withName('/')); - }) - : Container(), - image != null - ? InkWell( - onTap: () => Navigator.push( - context, - FadePage( - page: InsuranceUpdate(), + textTheme: TextTheme( + headline6: + TextStyle(color: Colors.white, fontWeight: FontWeight.bold), + ), + title: Texts( + authenticatedUserObject.isLogin || !isShowDecPage + ? appBarTitle.toUpperCase() + : TranslationBase.of(context).serviceInformationTitle, + color: Colors.white, + bold: true, ), - ), - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Image.asset( - image, - height: SizeConfig.heightMultiplier * 5, - width: SizeConfig.heightMultiplier * 5, - color: Colors.grey, + leading: Builder( + builder: (BuildContext context) { + return GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () => Navigator.pop(context), + child: Icon(Icons.arrow_back_ios, color: Colors.grey), + ); + }, ), - ), - ) - : IconButton( - icon: Icon(FontAwesomeIcons.ellipsisV), - color: Colors.grey, - onPressed: () { - settingModalBottomSheet(context); - }, - ), - if (appBarIcons != null) ...appBarIcons - ], - ) + centerTitle: true, + actions: [ + isPharmacy + ? IconButton( + icon: Icon(Icons.shopping_cart), + color: Colors.grey, + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => CartOrderPage()), + ); +// Navigator.of(context) +// .popUntil(ModalRoute.withName('/')); + }) + : Container(), + image != null + ? InkWell( + onTap: () => Navigator.push( + context, + FadePage( + page: InsuranceUpdate(), + ), + ), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Image.asset( + image, + height: SizeConfig.heightMultiplier * 5, + width: SizeConfig.heightMultiplier * 5, + color: Colors.grey, + ), + ), + ) + : IconButton( + icon: Icon(FontAwesomeIcons.ellipsisV), + color: Colors.grey, + onPressed: () { + settingModalBottomSheet(context); + }, + ), + if (appBarIcons != null) ...appBarIcons + ], + ) : Container( - height: 0, - width: 0, - ); + height: 0, + width: 0, + ); } @override Size get preferredSize => Size(double.maxFinite, 60); } - -