diff --git a/lib/pages/ContactUs/contact_us_page.dart b/lib/pages/ContactUs/contact_us_page.dart index 39557e4e..8bb19b4c 100644 --- a/lib/pages/ContactUs/contact_us_page.dart +++ b/lib/pages/ContactUs/contact_us_page.dart @@ -1,5 +1,6 @@ import 'package:diplomaticquarterapp/pages/ContactUs/widgets/card_common_contat.dart'; import 'package:diplomaticquarterapp/uitl/location_util.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; @@ -31,48 +32,75 @@ class _ContactUsPageState extends State { showNewAppBar: true, showNewAppBarTitle: true, backgroundColor: Color(0xffF8F8F8), - body: Container( - margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Expanded( - child: CardCommonContact( - image: 'assets/images/new-design/find_us_icon.png', - text: TranslationBase.of(context).findUs, - subText: "", - type: 0, - ), - ), - Expanded( - child: CardCommonContact(image: 'assets/images/new-design/feedback_icon.png', text: TranslationBase.of(context).feedback, subText: "", type: 1), - ), - ], - ), - Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Expanded( - child: CardCommonContact( - image: 'assets/images/new-design/live_chat_icon.png', - text: TranslationBase.of(context).liveChat, - subText: TranslationBase.of(context).service, - type: 2, - ), - ), - Expanded( - child: Container(), - ), - ], - ), - ], - ), + body: GridView( + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, crossAxisSpacing: 13, mainAxisSpacing: 9), + physics: NeverScrollableScrollPhysics(), + padding: EdgeInsets.only(top: 25), + shrinkWrap: true, + children: [ + CardCommonContact( + image: 'assets/images/new-design/find_us_icon.png', + text: TranslationBase.of(context).findUs, + subText: "", + type: 0, + ), + CardCommonContact( + image: 'assets/images/new-design/feedback_icon.png', + text: TranslationBase.of(context).feedback, + subText: "", + type: 1, + ), + CardCommonContact( + image: 'assets/images/new-design/live_chat_icon.png', + text: TranslationBase.of(context).liveChat, + subText: "", + type: 2, + ), + ], ), + + // Container( + // margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0), + // child: Column( + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // Row( + // mainAxisSize: MainAxisSize.max, + // mainAxisAlignment: MainAxisAlignment.start, + // children: [ + // Expanded( + // child: CardCommonContact( + // image: 'assets/images/new-design/find_us_icon.png', + // text: TranslationBase.of(context).findUs, + // subText: "", + // type: 0, + // ), + // ), + // Expanded( + // child: CardCommonContact(image: 'assets/images/new-design/feedback_icon.png', text: TranslationBase.of(context).feedback, subText: "", type: 1), + // ), + // ], + // ), + // Row( + // mainAxisSize: MainAxisSize.max, + // mainAxisAlignment: MainAxisAlignment.start, + // children: [ + // Expanded( + // child: CardCommonContact( + // image: 'assets/images/new-design/live_chat_icon.png', + // text: TranslationBase.of(context).liveChat, + // subText: TranslationBase.of(context).service, + // type: 2, + // ), + // ), + // Expanded( + // child: Container(), + // ), + // ], + // ), + // ], + // ), + // ), ); } } diff --git a/lib/pages/ContactUs/findus/findus_page.dart b/lib/pages/ContactUs/findus/findus_page.dart index 80648292..8e3f3674 100644 --- a/lib/pages/ContactUs/findus/findus_page.dart +++ b/lib/pages/ContactUs/findus/findus_page.dart @@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/viewModels/contactus/findus_view_model import 'package:diplomaticquarterapp/pages/ContactUs/findus/hospitrals_page.dart'; import 'package:diplomaticquarterapp/pages/ContactUs/findus/pharmacies_page.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; @@ -15,8 +16,7 @@ class FindUsPage extends StatefulWidget { _FindUsPageState createState() => _FindUsPageState(); } -class _FindUsPageState extends State - with SingleTickerProviderStateMixin { +class _FindUsPageState extends State with SingleTickerProviderStateMixin { TabController _tabController; @override void initState() { @@ -40,89 +40,42 @@ class _FindUsPageState extends State isShowAppBar: true, isShowDecPage: false, appBarTitle: 'Locations', + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: Color(0xffF8F8F8), baseViewModel: model, - body: Scaffold( - extendBodyBehindAppBar: true, - appBar: PreferredSize( - preferredSize: Size.fromHeight(65.0), - child: Stack( - children: [ - Positioned( - bottom: 1, - left: 0, - right: 0, - child: BackdropFilter( - filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10), - child: Container( - color: Theme.of(context) - .scaffoldBackgroundColor - .withOpacity(0.8), - height: 70.0, - ), - ), - ), - Center( - child: Container( - height: 60.0, - margin: EdgeInsets.only(top: 10.0), - width: MediaQuery.of(context).size.width * 0.92, // 0.9, - decoration: BoxDecoration( - border: Border( - bottom: BorderSide( - color: Theme.of(context).dividerColor, - width: 0.9), //width: 0.7 - ), - color: Colors.white), - child: Center( - child: TabBar( - isScrollable: true, - controller: _tabController, - indicatorWeight: 5.0, - indicatorSize: TabBarIndicatorSize.tab, - labelColor: Theme.of(context).primaryColor, - labelPadding: - EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0), - unselectedLabelColor: Colors.grey[800], - tabs: [ - Container( - width: MediaQuery.of(context).size.width * 0.30, - child: Center( - child: Texts(' Hospitals '), - ), - ), - Container( - width: MediaQuery.of(context).size.width * 0.30, - child: Center( - child: Texts(' Pharmacies '), - ), - ), - ], - ), - ), - ), - ), - ], + body: Column( + children: [ + TabBar( + controller: _tabController, + indicatorWeight: 3.0, + indicatorSize: TabBarIndicatorSize.tab, + labelColor: Color(0xff2B353E), + unselectedLabelColor: Color(0xff575757), + labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20), + labelStyle: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + unselectedLabelStyle: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, + ), + tabs: [Text(TranslationBase.of(context).hospitals), Text(TranslationBase.of(context).pharmacies)], ), - ), - body: Column( - children: [ - Expanded( - child: TabBarView( - physics: BouncingScrollPhysics(), - controller: _tabController, - children: [ - HospitalsPage( - findusHospitalModelList: model.FindusHospitalModelList, - ), //SendFeedbackPage(), - PharmaciesPage( - findusPharmaciesModelList: - model.FindusPharmaciesModelList, - ) //StatusFeedbackPage() - ], - ), - ) - ], - ), + Expanded( + child: TabBarView( + physics: BouncingScrollPhysics(), + controller: _tabController, + children: [ + HospitalsPage(findusHospitalModelList: model.FindusHospitalModelList), //SendFeedbackPage(), + PharmaciesPage(findusPharmaciesModelList: model.FindusPharmaciesModelList) //StatusFeedbackPage() + ], + ), + ) + ], ), ), ); diff --git a/lib/pages/ContactUs/findus/hospitrals_page.dart b/lib/pages/ContactUs/findus/hospitrals_page.dart index 2d257488..7d2bd31d 100644 --- a/lib/pages/ContactUs/findus/hospitrals_page.dart +++ b/lib/pages/ContactUs/findus/hospitrals_page.dart @@ -1,6 +1,7 @@ import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart'; import 'package:diplomaticquarterapp/core/viewModels/contactus/findus_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; @@ -22,7 +23,180 @@ class HospitalsPage extends StatefulWidget { class _HospitalsPageState extends State { @override Widget build(BuildContext context) { - return AppScaffold( + return SingleChildScrollView( + physics: BouncingScrollPhysics(), + padding: EdgeInsets.only(bottom: 21, top: 21, left: 21, right: 21), + child: Column( + children: [ + ListView.separated( + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + padding: EdgeInsets.zero, + separatorBuilder: (context, index) => SizedBox(height: 14), + itemBuilder: (context, index) { + GetHMGLocationsModel _location = widget.findusHospitalModelList[index]; + return Container( + padding: const EdgeInsets.only(left: 12, right: 12, top: 12, bottom: 12), + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + //spreadRadius: 5, + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + color: Colors.white), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + InkWell( + onTap: () { + showDialog( + context: context, + builder: (_) => AssetGiffyDialog( + title: Text( + _location.locationName, + style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.w600), + ), + image: Image.network( + _location.projectImageURL.toString(), + fit: BoxFit.cover, + ), + buttonCancelText: Text(TranslationBase.of(context).cancel), + buttonCancelColor: Colors.grey, + onlyCancelButton: true, + ), + ); + }, + child: ClipRRect( + borderRadius: BorderRadius.circular(12), + child: Image.network( + _location.projectImageURL.toString(), + width: 48, + height: 48, + fit: BoxFit.cover, + ), + ), + ), + Expanded( + child: Padding( + padding: EdgeInsets.only(left: 12, right: 12), + child: Text( + _location.locationName?.trim() ?? "", + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + letterSpacing: -0.56, + ), + ), + ), + ), //model.cOCItemList[index].cOCTitl + IconButton( + icon: Icon( + Icons.location_on, + color: Color(0xff2B353E), + ), + constraints: BoxConstraints(), + padding: EdgeInsets.all(8), + tooltip: '', + onPressed: () { + setState(() { + MapsLauncher.launchCoordinates(double.parse(_location.latitude), double.parse(_location.longitude), _location.locationName); + }); + }, + ), + IconButton( + icon: Icon( + Icons.phone, + color: Color(0xff2B353E), + ), + constraints: BoxConstraints(), + padding: EdgeInsets.all(8), + tooltip: '', + onPressed: () { + setState(() { + launch("tel://" + _location.phoneNumber); + }); + }, + ), + ], + ), + ); + }, + itemCount: widget.findusHospitalModelList.length, + ), + Container( + margin: EdgeInsets.only(top: 14), + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + //spreadRadius: 5, + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + color: Colors.white), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + IconButton( + icon: new Image.asset('assets/images/new-design/youtube.png'), + iconSize: 48, + tooltip: 'Youtube', + onPressed: () { + setState(() { + launch("https://www.youtube.com/c/DrsulaimanAlhabibHospitals"); + }); + }, + ), + IconButton( + icon: new Image.asset('assets/images/new-design/linkedin.png'), + tooltip: 'LinkedIn', + iconSize: 48, + onPressed: () { + setState(() { + launch("https://www.linkedin.com/company/drsulaiman-alhabib-medical-group"); + }); + }, + ), + IconButton( + icon: new Image.asset('assets/images/new-design/twitter.png'), + tooltip: 'Twitter', + iconSize: 48, + onPressed: () { + setState(() { + launch("https://twitter.com/HMG"); + }); + }, + ), + IconButton( + icon: new Image.asset('assets/images/new-design/facebook.png'), + tooltip: 'facebook', + iconSize: 48, + onPressed: () { + setState(() { + launch("https://www.facebook.com/DrSulaimanAlHabib?ref=tn_tnmn"); + }); + }, + ), + ], + ), + ), + ], + ), + ); + + AppScaffold( isShowDecPage: false, body: SingleChildScrollView( child: Container( @@ -46,65 +220,37 @@ class _HospitalsPageState extends State { mainAxisAlignment: MainAxisAlignment.center, children: [ Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Expanded( child: Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - crossAxisAlignment: - CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, children: [ InkWell( onTap: () { showDialog( context: context, - builder: (_) => - AssetGiffyDialog( + builder: (_) => AssetGiffyDialog( title: Text( - widget - .findusHospitalModelList[ - index] - .locationName, - style: TextStyle( - fontSize: 22.0, - fontWeight: - FontWeight - .w600), + widget.findusHospitalModelList[index].locationName, + style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.w600), ), image: Image.network( - widget - .findusHospitalModelList[ - index] - .projectImageURL - .toString(), + widget.findusHospitalModelList[index].projectImageURL.toString(), fit: BoxFit.cover, ), - buttonCancelText: - Text('cancel'), - buttonCancelColor: - Colors.grey, + buttonCancelText: Text('cancel'), + buttonCancelColor: Colors.grey, onlyCancelButton: true, )); }, - child: Container( - width: 70, - height: 70, - child: Image.network(widget - .findusHospitalModelList[ - index] - .projectImageURL - .toString())), + child: Container(width: 70, height: 70, child: Image.network(widget.findusHospitalModelList[index].projectImageURL.toString())), ), Expanded( flex: 4, child: Container( - margin: EdgeInsets.only( - left: 5, - right: 5, - top: 10, - bottom: 1), + margin: EdgeInsets.only(left: 5, right: 5, top: 10, bottom: 1), child: Texts( '${widget.findusHospitalModelList[index].locationName}', textAlign: TextAlign.start, @@ -112,14 +258,12 @@ class _HospitalsPageState extends State { Expanded( flex: 2, child: Row( - crossAxisAlignment: - CrossAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, children: [ IconButton( icon: Icon( Icons.location_on, - color: Theme.of(context) - .primaryColor, + color: Theme.of(context).primaryColor, size: 35, ), // icon: new Image.asset( @@ -127,27 +271,15 @@ class _HospitalsPageState extends State { tooltip: '', onPressed: () { setState(() { - MapsLauncher.launchCoordinates( - double.parse(widget - .findusHospitalModelList[ - index] - .latitude), - double.parse(widget - .findusHospitalModelList[ - index] - .longitude), - widget - .findusHospitalModelList[ - index] - .locationName); + MapsLauncher.launchCoordinates(double.parse(widget.findusHospitalModelList[index].latitude), + double.parse(widget.findusHospitalModelList[index].longitude), widget.findusHospitalModelList[index].locationName); }); }, ), IconButton( icon: Icon( Icons.phone, - color: Theme.of(context) - .primaryColor, + color: Theme.of(context).primaryColor, size: 35, ), // icon: new Image.asset( @@ -156,11 +288,7 @@ class _HospitalsPageState extends State { onPressed: () { setState(() { // _volume += 10; - launch("tel://" + - widget - .findusHospitalModelList[ - index] - .phoneNumber); + launch("tel://" + widget.findusHospitalModelList[index].phoneNumber); }); }, ), @@ -193,32 +321,27 @@ class _HospitalsPageState extends State { mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ IconButton( - icon: new Image.asset( - 'assets/images/new-design/youtube.png'), + icon: new Image.asset('assets/images/new-design/youtube.png'), iconSize: 70, tooltip: 'Youtube', onPressed: () { setState(() { - launch( - "https://www.youtube.com/c/DrsulaimanAlhabibHospitals"); + launch("https://www.youtube.com/c/DrsulaimanAlhabibHospitals"); }); }, ), IconButton( - icon: new Image.asset( - 'assets/images/new-design/linkedin.png'), + icon: new Image.asset('assets/images/new-design/linkedin.png'), tooltip: 'LinkedIn', iconSize: 70, onPressed: () { setState(() { - launch( - "https://www.linkedin.com/company/drsulaiman-alhabib-medical-group"); + launch("https://www.linkedin.com/company/drsulaiman-alhabib-medical-group"); }); }, ), IconButton( - icon: new Image.asset( - 'assets/images/new-design/twitter.png'), + icon: new Image.asset('assets/images/new-design/twitter.png'), tooltip: 'Twitter', iconSize: 70, onPressed: () { @@ -228,14 +351,12 @@ class _HospitalsPageState extends State { }, ), IconButton( - icon: new Image.asset( - 'assets/images/new-design/facebook.png'), + icon: new Image.asset('assets/images/new-design/facebook.png'), tooltip: 'facebook', iconSize: 70, onPressed: () { setState(() { - launch( - "https://www.facebook.com/DrSulaimanAlHabib?ref=tn_tnmn"); + launch("https://www.facebook.com/DrSulaimanAlHabib?ref=tn_tnmn"); }); }, ), diff --git a/lib/pages/ContactUs/findus/pharmacies_page.dart b/lib/pages/ContactUs/findus/pharmacies_page.dart index 6cf94728..58460e9c 100644 --- a/lib/pages/ContactUs/findus/pharmacies_page.dart +++ b/lib/pages/ContactUs/findus/pharmacies_page.dart @@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.dart'; import 'package:diplomaticquarterapp/core/viewModels/contactus/findus_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; @@ -22,239 +23,199 @@ class PharmaciesPage extends StatefulWidget { class _PharmaciesPageState extends State { @override Widget build(BuildContext context) { - return AppScaffold( - isShowDecPage: false, - body: SingleChildScrollView( - child: Container( - margin: EdgeInsets.only(left: 15, right: 15, top: 70), - child: Column( - children: [ - ...List.generate( - widget.findusPharmaciesModelList.length, - (index) => Container( - decoration: BoxDecoration( - shape: BoxShape.rectangle, - border: Border.all(color: Colors.white, width: 0.5), - borderRadius: BorderRadius.all(Radius.circular(5)), - color: Colors.white, - ), - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Expanded( - child: Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - crossAxisAlignment: - CrossAxisAlignment.center, - children: [ - InkWell( - onTap: () { - showDialog( - context: context, - builder: (_) => - AssetGiffyDialog( - title: Text( - widget - .findusPharmaciesModelList[ - index] - .locationName, - style: TextStyle( - fontSize: 22.0, - fontWeight: - FontWeight - .w600), - ), - image: widget - .findusPharmaciesModelList[ - index] - .projectImageURL != - null - ? Image.network( - widget - .findusPharmaciesModelList[ - index] - .projectImageURL, - fit: BoxFit.cover, - ) - : Image.network( - 'https://hmgwebservices.com/Images/Hospitals/15.jpg', - fit: BoxFit.cover, - ), - buttonCancelText: - Text('cancel'), - // buttonCancelText:Text(model.user.projectID) , - buttonCancelColor: - Colors.grey, - onlyCancelButton: true, - )); - }, - child: Container( - width: 70, - height: 70, - child: Image.network(widget - .findusPharmaciesModelList[ - index] - .projectImageURL != - null - ? widget - .findusPharmaciesModelList[ - index] - .projectImageURL - .toString() - : 'https://hmgwebservices.com/Images/Hospitals/15.jpg')), - ), - Expanded( - flex: 4, - child: Container( - margin: EdgeInsets.only( - left: 5, right: 5), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Texts( - '${widget.findusPharmaciesModelList[index].locationName}', - textAlign: TextAlign.start, - ), - SizedBox( - height: 4, - ), - Texts( - '${widget.findusPharmaciesModelList[index].cityName}', - textAlign: TextAlign.center, - ), - ], - ), - ), - ), - //model.cOCItemList[index].cOCTitl - Expanded( - flex: 2, - child: Row( - children: [ - IconButton( - icon: Icon(Icons.location_on,color: Theme.of(context).primaryColor,size: 35,), - tooltip: '', - onPressed: () { - setState(() { - MapsLauncher.launchCoordinates( - double.parse(widget - .findusPharmaciesModelList[ - index] - .latitude), - double.parse(widget - .findusPharmaciesModelList[ - index] - .longitude), - widget - .findusPharmaciesModelList[ - index] - .locationName); - }); - }, - ), - IconButton( - icon: Icon(Icons.phone,color: Theme.of(context).primaryColor,size: 35,), - tooltip: 'I', - onPressed: () { - setState(() { - - launch("tel://" + - widget - .findusPharmaciesModelList[ - index] - .phoneNumber); - }); - }, - ), - ], - ), - ), - ], - ), + return SingleChildScrollView( + physics: BouncingScrollPhysics(), + padding: EdgeInsets.only(bottom: 21, top: 21, left: 21, right: 21), + child: Column( + children: [ + ListView.separated( + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + padding: EdgeInsets.zero, + separatorBuilder: (context, index) => SizedBox(height: 14), + itemBuilder: (context, index) { + GetHMGLocationsModel _location = widget.findusPharmaciesModelList[index]; + return Container( + padding: const EdgeInsets.only(left: 12, right: 12, top: 12, bottom: 12), + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + //spreadRadius: 5, + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + color: Colors.white), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + InkWell( + onTap: () { + showDialog( + context: context, + builder: (_) => AssetGiffyDialog( + title: Text( + _location.locationName, + style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.w600), + ), + image: _location.projectImageURL != null + ? Image.network( + _location.projectImageURL, + fit: BoxFit.cover, + ) + : Image.network( + 'https://hmgwebservices.com/Images/Hospitals/15.jpg', + fit: BoxFit.cover, ), - ], - ), - Divider( - height: 4.5, - color: Colors.grey[500], - ) - ], + buttonCancelText: Text(TranslationBase.of(context).cancel), + // buttonCancelText:Text(model.user.projectID) , + buttonCancelColor: Colors.grey, + onlyCancelButton: true, ), - ), - )), - SizedBox( - height: 8, - ), - Container( - width: double.infinity, - height: 100, - color: Colors.white, - child: Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - IconButton( - icon: new Image.asset( - 'assets/images/new-design/youtube.png'), - iconSize: 70, - tooltip: 'Youtube', - onPressed: () { - setState(() { - // _volume += 10; - launch( - "https://www.youtube.com/c/DrsulaimanAlhabibHospitals"); - }); + ); }, + child: ClipRRect( + borderRadius: BorderRadius.circular(12), + child: Image.network( + _location?.projectImageURL?.toString() ?? 'https://hmgwebservices.com/Images/Hospitals/15.jpg', + width: 48, + height: 48, + fit: BoxFit.cover, + ), + ), ), - IconButton( - icon: new Image.asset( - 'assets/images/new-design/linkedin.png'), - tooltip: 'LinkedIn', - iconSize: 70, - onPressed: () { - setState(() { - launch( - "https://www.linkedin.com/company/drsulaiman-alhabib-medical-group"); - }); - }, + Expanded( + child: Padding( + padding: EdgeInsets.only(left: 12, right: 12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + _location.locationName?.trim() ?? "", + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + letterSpacing: -0.56, + ), + ), + SizedBox( + height: 4, + ), + Text( + _location.cityName?.trim() ?? "", + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + letterSpacing: -0.56, + ), + ), + ], + ), + ), ), IconButton( - icon: new Image.asset( - 'assets/images/new-design/twitter.png'), - tooltip: 'Twitter', - iconSize: 70, + icon: Icon( + Icons.location_on, + color: Color(0xff2B353E), + ), + constraints: BoxConstraints(), + padding: EdgeInsets.all(8), + tooltip: '', onPressed: () { setState(() { - launch("https://twitter.com/HMG"); + MapsLauncher.launchCoordinates(double.parse(_location.latitude), double.parse(_location.longitude), _location.locationName); }); }, ), IconButton( - icon: new Image.asset( - 'assets/images/new-design/facebook.png'), - tooltip: 'facebook', - iconSize: 70, + icon: Icon( + Icons.phone, + color: Color(0xff2B353E), + ), + constraints: BoxConstraints(), + padding: EdgeInsets.all(8), + tooltip: '', onPressed: () { setState(() { - launch( - "https://www.facebook.com/DrSulaimanAlHabib?ref=tn_tnmn"); + launch("tel://" + _location.phoneNumber); }); }, ), ], ), - ), - ], + ); + }, + itemCount: widget.findusPharmaciesModelList.length, + ), + Container( + margin: EdgeInsets.only(top: 14), + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(10.0), + ), + boxShadow: [ + BoxShadow( + color: Color(0xff000000).withOpacity(.05), + //spreadRadius: 5, + blurRadius: 27, + offset: Offset(0, -3), + ), + ], + color: Colors.white), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + IconButton( + icon: new Image.asset('assets/images/new-design/youtube.png'), + iconSize: 48, + tooltip: 'Youtube', + onPressed: () { + setState(() { + launch("https://www.youtube.com/c/DrsulaimanAlhabibHospitals"); + }); + }, + ), + IconButton( + icon: new Image.asset('assets/images/new-design/linkedin.png'), + tooltip: 'LinkedIn', + iconSize: 48, + onPressed: () { + setState(() { + launch("https://www.linkedin.com/company/drsulaiman-alhabib-medical-group"); + }); + }, + ), + IconButton( + icon: new Image.asset('assets/images/new-design/twitter.png'), + tooltip: 'Twitter', + iconSize: 48, + onPressed: () { + setState(() { + launch("https://twitter.com/HMG"); + }); + }, + ), + IconButton( + icon: new Image.asset('assets/images/new-design/facebook.png'), + tooltip: 'facebook', + iconSize: 48, + onPressed: () { + setState(() { + launch("https://www.facebook.com/DrSulaimanAlHabib?ref=tn_tnmn"); + }); + }, + ), + ], + ), ), - ), + ], ), ); } diff --git a/lib/pages/ContactUs/widgets/card_common_contat.dart b/lib/pages/ContactUs/widgets/card_common_contat.dart index 8848e2ff..0fde26cd 100644 --- a/lib/pages/ContactUs/widgets/card_common_contat.dart +++ b/lib/pages/ContactUs/widgets/card_common_contat.dart @@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/ContactUs/LiveChat/livechat_page.dart'; import 'package:diplomaticquarterapp/pages/ContactUs/findus/findus_page.dart'; import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; @@ -14,11 +15,7 @@ class CardCommonContact extends StatelessWidget { final text; final subText; final type; - const CardCommonContact( - {@required this.image, - @required this.text, - @required this.subText, - @required this.type}); + const CardCommonContact({@required this.image, @required this.text, @required this.subText, @required this.type}); @override Widget build(BuildContext context) { @@ -27,31 +24,37 @@ class CardCommonContact extends StatelessWidget { onTap: () { navigateToSearch(context, this.type); }, - child: Container( + child: + + // MedicalProfileItem( + // imagePath: image, + // title: text, + // subTitle: subText, + // isPngImage: true, + // ) + + Container( margin: EdgeInsets.fromLTRB(9.0, 9.0, 9.0, 9.0), - decoration: BoxDecoration(boxShadow: [ - BoxShadow(color: Colors.grey[400], blurRadius: 2.0, spreadRadius: 0.0) - ], borderRadius: BorderRadius.circular(10), color: Colors.white), + decoration: BoxDecoration(boxShadow: [BoxShadow(color: Colors.grey[400], blurRadius: 2.0, spreadRadius: 0.0)], borderRadius: BorderRadius.circular(10), color: Colors.white), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0), child: Texts(this.text, - // overflow: TextOverflow.clip, - color:secondaryColor, + // overflow: TextOverflow.clip, + color: secondaryColor, fontWeight: FontWeight.w700, fontSize: 20.0), ), Container( margin: EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 0.0), - child: Texts(this.subText, - color: Colors.black, fontSize: 15.0), + child: Texts(this.subText, color: Colors.black, fontSize: 15.0), ), Align( - alignment: projectViewModel.isArabic? Alignment.bottomLeft:Alignment.bottomRight, + alignment: projectViewModel.isArabic ? Alignment.bottomLeft : Alignment.bottomRight, child: Container( - margin: EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 8.0), + margin: EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 8.0), child: Image.asset(this.image, width: 60.0, height: 60.0), ), ), @@ -62,7 +65,6 @@ class CardCommonContact extends StatelessWidget { } Future navigateToSearch(context, type) async { - if (type == 0) { Navigator.push(context, FadePage(page: FindUsPage())); } else if (type == 1) { @@ -70,7 +72,6 @@ class CardCommonContact extends StatelessWidget { } else if (type == 2) { //LiveChatPage Navigator.push(context, FadePage(page: LiveChatPage())); - } } } diff --git a/lib/pages/login/welcome.dart b/lib/pages/login/welcome.dart index 02c009a2..9d9a278d 100644 --- a/lib/pages/login/welcome.dart +++ b/lib/pages/login/welcome.dart @@ -41,13 +41,14 @@ class _WelcomeLogin extends State { physics: BouncingScrollPhysics(), children: [ SizedBox(height: 12), - Align( - alignment: Alignment.centerLeft, - child: SvgPicture.asset( - "assets/images/new/hmg_icon.svg", - height: 62, - width: 62, - ), + Row( + children: [ + SvgPicture.asset( + "assets/images/new/hmg_icon.svg", + height: 62, + width: 62, + ), + ], ), SizedBox(height: 24), Text( diff --git a/lib/widgets/data_display/medical/medical_profile_item.dart b/lib/widgets/data_display/medical/medical_profile_item.dart index e4655a30..86fe85d4 100644 --- a/lib/widgets/data_display/medical/medical_profile_item.dart +++ b/lib/widgets/data_display/medical/medical_profile_item.dart @@ -16,10 +16,11 @@ class MedicalProfileItem extends StatelessWidget { final String title; final String subTitle; final bool hasBadge = false; + final bool isPngImage; bool isEnable; Color imgColor; - MedicalProfileItem({@required this.imagePath, @required this.title, @required this.subTitle, hasBadge, this.isEnable = true, this.imgColor}); + MedicalProfileItem({@required this.imagePath, @required this.title, @required this.subTitle, hasBadge, this.isEnable = true, this.imgColor, this.isPngImage = false}); @override Widget build(BuildContext context) { @@ -46,12 +47,19 @@ class MedicalProfileItem extends StatelessWidget { // ), // ), mFlex(1), - SvgPicture.asset( - "assets/images/new/services/$imagePath", - height: SizeConfig.widthMultiplier * 7, - width: SizeConfig.widthMultiplier * 7, - color: imgColor, - ), + isPngImage + ? Image.asset( + imagePath, + height: SizeConfig.widthMultiplier * 7, + width: SizeConfig.widthMultiplier * 7, + color: imgColor, + ) + : SvgPicture.asset( + "assets/images/new/services/$imagePath", + height: SizeConfig.widthMultiplier * 7, + width: SizeConfig.widthMultiplier * 7, + color: imgColor, + ), mFlex(2), Text( title,