diff --git a/assets/images/new-design/call.png b/assets/images/new-design/call.png new file mode 100644 index 00000000..cf6713cb Binary files /dev/null and b/assets/images/new-design/call.png differ diff --git a/assets/images/new-design/navigate.png b/assets/images/new-design/navigate.png new file mode 100644 index 00000000..99cfa09a Binary files /dev/null and b/assets/images/new-design/navigate.png differ diff --git a/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart b/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart index 66ad31ee..206a95c4 100644 --- a/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart +++ b/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart @@ -1,4 +1,3 @@ -import 'package:diplomaticquarterapp/core/viewModels/contactus/findus_view_model.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/viewModels/contactus/livechat_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; @@ -36,80 +35,107 @@ class _HospitalsLiveChatPageState extends State { child: Container( margin: EdgeInsets.only(left: 15, right: 15), child: Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ - SizedBox( - height: 20, - ), - Container( - width: double.infinity, - height: 200, - decoration: BoxDecoration( - image: DecorationImage( - image: ExactAssetImage( - 'assets/images/dashboard_top_bg.png'), - fit: BoxFit.cover), - ), - child: Texts( - 'You can now talk directly to the appointments department by chat or request a call back\n \nChoose Hospital :', - color: Colors.white, - textAlign: TextAlign.center, - ), - ), - /////////// - ...List.generate( - model.LiveChatModelList.length, - (index) => Container( - margin: - EdgeInsets.only(left: 20, right: 20, bottom: 20), + Stack( + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 20, + ), + Container( + width: double.infinity, + height: 200, decoration: BoxDecoration( - shape: BoxShape.rectangle, - border: Border.all(color: Colors.white, width: 0.5), - borderRadius: BorderRadius.all(Radius.circular(5)), - color: tappedIndex == index - ? Colors.red - : Colors.white, + image: DecorationImage( + image: ExactAssetImage( + 'assets/images/dashboard_top_bg.png'), + fit: BoxFit.cover), ), child: Padding( padding: const EdgeInsets.all(8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - InkWell( - onTap: () { - setState(() { - tappedIndex = index; - chat = - "http://chat.dshmg.com:7788/hmgchatapp/hmgchattest/Index.aspx?Name=${model.user.firstName}&PatientID=${model.user.patientID}&MobileNo=${model.user.mobileNumber}&Language=en&WorkGroup=${model.LiveChatModelList[index].value}"; - }); - }, - child: Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - Expanded( - child: Row( - mainAxisAlignment: - MainAxisAlignment.spaceAround, + child: Texts( + 'You can now talk directly to the appointments department by chat or request a call back\n \nChoose Hospital :', + color: Colors.white, + textAlign: TextAlign.start, + ), + ), + ), + SizedBox( + height: MediaQuery.of(context).size.height * 0.85, + ), + SizedBox( + height: 100, + ), + ], + ), + Positioned( + left: 13, + right: 13, + top: 200, + child: Container( + width: double.maxFinite, + child: Column( + children: [ + ...List.generate( + model.LiveChatModelList.length, + (index) => Container( + margin: EdgeInsets.only( + left: 0, right: 0, bottom: 20), + decoration: BoxDecoration( + shape: BoxShape.rectangle, + border: Border.all( + color: Colors.white, width: 0.5), + borderRadius: BorderRadius.all( + Radius.circular(5)), + color: tappedIndex == index + ? Colors.red + : Colors.white, + ), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( crossAxisAlignment: - CrossAxisAlignment.center, + CrossAxisAlignment.start, children: [ - Expanded( - flex: 4, - child: Container( - margin: EdgeInsets.only( - left: 5, right: 5), - child: Texts( - '${model.LiveChatModelList[index].projectName}', - color: - tappedIndex == index - ? Colors.white - : Colors.black, - textAlign: - TextAlign.center, - ))), //model.cOCItemList[index].cOCTitl - Expanded( - flex: 1, + InkWell( + onTap: () { + setState(() { + tappedIndex = index; + chat = + "http://chat.dshmg.com:7788/hmgchatapp/hmgchattest/Index.aspx?Name=${model.user.firstName}&PatientID=${model.user.patientID}&MobileNo=${model.user.mobileNumber}&Language=en&WorkGroup=${model.LiveChatModelList[index].value}"; + }); + }, child: Row( - children: [ + mainAxisAlignment: + MainAxisAlignment + .spaceAround, + crossAxisAlignment: + CrossAxisAlignment.center, + children: [ + SizedBox( + width: 20, + ), + Expanded( + child: Container( + margin: + EdgeInsets.only( + left: 5, + right: 5), + child: Texts( + '${model.LiveChatModelList[index].projectName}', + color: + tappedIndex == + index + ? Colors + .white + : Colors + .black, + textAlign: TextAlign + .center, + ))), //model.cOCItemList[index].cOCTitl IconButton( icon: Icon( Icons @@ -126,20 +152,21 @@ class _HospitalsLiveChatPageState extends State { ), ], ), - ), + ) ], ), ), - ], - ), - ) - ], - ), - ), - )), - SizedBox( - height: 100, + )), + ], + ), + ), + ), + ], ), + Container( + height: MediaQuery.of(context).size.height * 0.20, + width: double.maxFinite, + ) ], ), ), diff --git a/lib/pages/ContactUs/LiveChat/livechat_page.dart b/lib/pages/ContactUs/LiveChat/livechat_page.dart index 154a03cd..b870234a 100644 --- a/lib/pages/ContactUs/LiveChat/livechat_page.dart +++ b/lib/pages/ContactUs/LiveChat/livechat_page.dart @@ -13,7 +13,8 @@ class LiveChatPage extends StatefulWidget { _LiveChatPageState createState() => _LiveChatPageState(); } -class _LiveChatPageState extends State with SingleTickerProviderStateMixin{ +class _LiveChatPageState extends State + with SingleTickerProviderStateMixin { TabController _tabController; @override void initState() { @@ -26,6 +27,7 @@ class _LiveChatPageState extends State with SingleTickerProviderSt super.dispose(); _tabController.dispose(); } + @override @override Widget build(BuildContext context) { @@ -56,12 +58,12 @@ class _LiveChatPageState extends State with SingleTickerProviderSt child: Container( height: 60.0, margin: EdgeInsets.only(top: 10.0), - width: MediaQuery.of(context).size.width * 0.9, + width: MediaQuery.of(context).size.width * 0.92, // 0.9, decoration: BoxDecoration( border: Border( bottom: BorderSide( color: Theme.of(context).dividerColor, - width: 0.7), + width: 0.9), //width: 0.7 ), color: Colors.white), child: Center( @@ -69,11 +71,13 @@ class _LiveChatPageState extends State with SingleTickerProviderSt isScrollable: true, controller: _tabController, indicatorWeight: 5.0, - indicatorSize: TabBarIndicatorSize.label, + //indicatorSize: TabBarIndicatorSize.label, + indicatorSize: TabBarIndicatorSize.tab, + indicatorColor: Colors.red[800], labelColor: Theme.of(context).primaryColor, labelPadding: - EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0), + EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0), unselectedLabelColor: Colors.grey[800], tabs: [ Container( @@ -103,7 +107,7 @@ class _LiveChatPageState extends State with SingleTickerProviderSt physics: BouncingScrollPhysics(), controller: _tabController, children: [ - HospitalsLiveChatPage(),//SendFeedbackPage(), + HospitalsLiveChatPage(), //SendFeedbackPage(), PhamaciesLiveChatPage() //StatusFeedbackPage() ], diff --git a/lib/pages/ContactUs/LiveChat/pharmaciesLivechat_page.dart b/lib/pages/ContactUs/LiveChat/pharmaciesLivechat_page.dart index c56123c9..cbda0828 100644 --- a/lib/pages/ContactUs/LiveChat/pharmaciesLivechat_page.dart +++ b/lib/pages/ContactUs/LiveChat/pharmaciesLivechat_page.dart @@ -20,15 +20,13 @@ class _PhamaciesLiveChatPageState extends State { String chat; @override - void initState() - { + void initState() { super.initState(); - tappedIndex=-1; - chat=""; + tappedIndex = -1; + chat = ""; } @override - Widget build(BuildContext context) { return BaseView( onModelReady: (model) => model.getLiveChatRequestOrders(), @@ -36,29 +34,31 @@ class _PhamaciesLiveChatPageState extends State { baseViewModel: model, body: SingleChildScrollView( child: Container( - margin: EdgeInsets.only(left: 15,right: 15), + margin: EdgeInsets.only(left: 15, right: 15), child: Column( children: [ - SizedBox(height: 20,), + SizedBox( + height: 20, + ), Container( width: double.infinity, height: 200, decoration: BoxDecoration( image: DecorationImage( - image: ExactAssetImage( - ''), - fit: BoxFit.cover), + image: ExactAssetImage(''), fit: BoxFit.cover), + ), + child: Texts( + 'You can now talk directly to the pharmacist by chat or request a call back', + color: Colors.black, + textAlign: TextAlign.center, ), - child: Texts('You can now talk directly to the pharmacist by chat or request a call back',color: Colors.black,textAlign: TextAlign.center,), - ), /////////// - SizedBox(height: 100,), - - + SizedBox( + height: 100, + ), ], - ), ), ), @@ -74,17 +74,16 @@ class _PhamaciesLiveChatPageState extends State { label: 'ٍStart', loading: model.state == ViewState.BusyLocal, onTap: () { - print("chat="+chat); - chat="http://chat.dshmg.com:7788/EPharmacyChat/EIndex.aspx?CustomerID=undefined&Name=${model.user.firstName}&MobileNo=${model.user.mobileNumber}&Language=1"; + print("chat=" + chat); + chat = + "http://chat.dshmg.com:7788/EPharmacyChat/EIndex.aspx?CustomerID=undefined&Name=${model.user.firstName}&MobileNo=${model.user.mobileNumber}&Language=1"; launch(chat); }, ), ), ), ), - ), ); - } } diff --git a/lib/pages/ContactUs/findus/findus_page.dart b/lib/pages/ContactUs/findus/findus_page.dart index e8f52cb9..9b39de3a 100644 --- a/lib/pages/ContactUs/findus/findus_page.dart +++ b/lib/pages/ContactUs/findus/findus_page.dart @@ -1,23 +1,22 @@ import 'dart:ui'; +import 'package:diplomaticquarterapp/core/viewModels/contactus/findus_view_model.dart'; import 'package:diplomaticquarterapp/pages/ContactUs/findus/hospitrals_page.dart'; import 'package:diplomaticquarterapp/pages/ContactUs/findus/pharmacies_page.dart'; -import 'package:diplomaticquarterapp/pages/feedback/send_feedback_page.dart'; -import 'package:diplomaticquarterapp/pages/feedback/status_feedback_page.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.dart'; + import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - - - class FindUsPage extends StatefulWidget { @override _FindUsPageState createState() => _FindUsPageState(); } -class _FindUsPageState extends State with SingleTickerProviderStateMixin{ +class _FindUsPageState extends State + with SingleTickerProviderStateMixin { TabController _tabController; @override void initState() { @@ -30,90 +29,102 @@ class _FindUsPageState extends State with SingleTickerProviderStateM super.dispose(); _tabController.dispose(); } + @override @override Widget build(BuildContext context) { - return AppScaffold( - isShowAppBar: true, - appBarTitle: 'Locations', - 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, + return BaseView( + onModelReady: (model) => model.getFindUsRequestOrders(), //model.getCOC(), + builder: (_, model, w) => AppScaffold( + isShowAppBar: true, + appBarTitle: 'Locations', + 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.9, - decoration: BoxDecoration( - border: Border( - bottom: BorderSide( - color: Theme.of(context).dividerColor, - width: 0.7), - ), - color: Colors.white), - child: Center( - child: TabBar( - isScrollable: true, - controller: _tabController, - indicatorWeight: 5.0, - indicatorSize: TabBarIndicatorSize.label, - indicatorColor: Colors.red[800], - labelColor: Theme.of(context).primaryColor, - labelPadding: - EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0), - unselectedLabelColor: Colors.grey[800], - tabs: [ - Container( - width: MediaQuery.of(context).size.width * 0.30, - child: Center( - child: Texts(' Hospitals '), - ), + 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 ), - Container( - width: MediaQuery.of(context).size.width * 0.30, - child: Center( - child: Texts(' Pharmacies '), + color: Colors.white), + child: Center( + child: TabBar( + isScrollable: true, + controller: _tabController, + indicatorWeight: 5.0, + //indicatorSize: TabBarIndicatorSize.label, + indicatorSize: TabBarIndicatorSize.tab, + + indicatorColor: Colors.red[800], + 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: [ + Expanded( + child: TabBarView( + physics: BouncingScrollPhysics(), + controller: _tabController, + children: [ + HospitalsPage( + findusHospitalModelList: model.FindusHospitalModelList, + ), //SendFeedbackPage(), + PharmaciesPage( + findusPharmaciesModelList: + model.FindusPharmaciesModelList, + ) //StatusFeedbackPage() + ], + ), + ) ], ), ), - body: Column( - children: [ - Expanded( - child: TabBarView( - physics: BouncingScrollPhysics(), - controller: _tabController, - children: [ - HospitalsPage(),//SendFeedbackPage(), - PharmaciesPage()//StatusFeedbackPage() - ], - ), - ) - ], - ), ), ); } diff --git a/lib/pages/ContactUs/findus/hospitrals_page.dart b/lib/pages/ContactUs/findus/hospitrals_page.dart index 315fe553..b883ae41 100644 --- a/lib/pages/ContactUs/findus/hospitrals_page.dart +++ b/lib/pages/ContactUs/findus/hospitrals_page.dart @@ -1,4 +1,4 @@ - +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/widgets/buttons/button.dart'; @@ -9,7 +9,12 @@ import 'package:flutter/material.dart'; import 'package:giffy_dialog/giffy_dialog.dart'; import 'package:url_launcher/url_launcher.dart'; import 'package:maps_launcher/maps_launcher.dart'; + class HospitalsPage extends StatefulWidget { + final List findusHospitalModelList; + + HospitalsPage({Key key, this.findusHospitalModelList}); + @override _HospitalsPageState createState() => _HospitalsPageState(); } @@ -17,168 +22,219 @@ class HospitalsPage extends StatefulWidget { class _HospitalsPageState extends State { @override Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.getFindUsRequestOrders(),//model.getCOC(), - builder: (_, model, widget) => AppScaffold( - baseViewModel: model, - body: SingleChildScrollView( - child: Container( - margin: EdgeInsets.only(left: 15,right: 15,top: 70), - child: Column( - children: [ - ...List.generate(model.FindusHospitalModelList.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, + return AppScaffold( + body: SingleChildScrollView( + child: Container( + // margin: EdgeInsets.only(left: 15,right: 15,top: 70), + margin: EdgeInsets.only(left: 15, right: 15, top: 70), + child: Column( + children: [ + ...List.generate( + widget.findusHospitalModelList.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, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, children: [ - InkWell( - onTap:(){ - showDialog( - context: context,builder: (_) => AssetGiffyDialog( - title: Text(model.FindusHospitalModelList[index].locationName, - style: TextStyle( - fontSize: 22.0, fontWeight: FontWeight.w600), - ),image:Image.network(model.FindusHospitalModelList[index].projectImageURL.toString(), fit: BoxFit.cover,), - buttonCancelText:Text('cancel') , - buttonCancelColor: Colors.grey, - onlyCancelButton: true, - - ) ); - }, - child: Container( - width: 70, - height: 70, - child: Image.network(model.FindusHospitalModelList[index].projectImageURL.toString())), - ), - Expanded( - flex: 4, - child: Container( - margin: EdgeInsets.only(left: 5,right: 5), - child: Texts('${model.FindusHospitalModelList[index].locationName}',textAlign: TextAlign.center,))),//model.cOCItemList[index].cOCTitl Expanded( - flex: 2, child: Row( - children: [ - IconButton( - icon: Icon(Icons.person_pin_circle_outlined,color: Colors.red,), - tooltip: 'Increase volume by 10', - onPressed: () { - setState(() { - MapsLauncher.launchCoordinates(double.parse(model.FindusHospitalModelList[index].latitude),double.parse(model.FindusHospitalModelList[index].longitude),model.FindusHospitalModelList[index].locationName); - // _volume += 10; - }); + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.center, + children: [ + InkWell( + onTap: () { + showDialog( + context: context, + builder: (_) => + AssetGiffyDialog( + title: Text( + widget + .findusHospitalModelList[ + index] + .locationName, + style: TextStyle( + fontSize: 22.0, + fontWeight: + FontWeight + .w600), + ), + image: Image.network( + widget + .findusHospitalModelList[ + index] + .projectImageURL + .toString(), + fit: BoxFit.cover, + ), + buttonCancelText: + Text('cancel'), + buttonCancelColor: + Colors.grey, + onlyCancelButton: true, + )); }, + child: Container( + width: 70, + height: 70, + child: Image.network(widget + .findusHospitalModelList[ + index] + .projectImageURL + .toString())), ), - IconButton( - icon: Icon(Icons.phone,color: Colors.red,), - tooltip: 'Increase volume by 10', - onPressed: () { - setState(() { - // _volume += 10; - launch("tel://" +model.FindusHospitalModelList[index].phoneNumber); - }); - }, + Expanded( + flex: 4, + child: Container( + margin: EdgeInsets.only( + left: 5, + right: 5, + top: 10, + bottom: 1), + child: Texts( + '${widget.findusHospitalModelList[index].locationName}', + textAlign: TextAlign.center, + ))), //model.cOCItemList[index].cOCTitl + Expanded( + flex: 2, + child: Row( + crossAxisAlignment: + CrossAxisAlignment.center, + children: [ + IconButton( + // icon: Icon(Icons.person_pin_circle_outlined,color: Colors.red,), + icon: new Image.asset( + 'assets/images/new-design/navigate.png'), + tooltip: '', + onPressed: () { + setState(() { + MapsLauncher.launchCoordinates( + double.parse(widget + .findusHospitalModelList[ + index] + .latitude), + double.parse(widget + .findusHospitalModelList[ + index] + .longitude), + widget + .findusHospitalModelList[ + index] + .locationName); + }); + }, + ), + IconButton( + // icon: Icon(Icons.phone,color: Colors.red,), + icon: new Image.asset( + 'assets/images/new-design/call.png'), + tooltip: '', + onPressed: () { + setState(() { + // _volume += 10; + launch("tel://" + + widget + .findusHospitalModelList[ + index] + .phoneNumber); + }); + }, + ), + ], + ), ), ], ), ), - - - ], ), - ), - - ], + // Texts('${model.FindusHospitalModelList[index].locationName}'), + Divider( + height: 4.5, + color: Colors.grey[500], + ) + ], + ), ), - // Texts('${model.FindusHospitalModelList[index].locationName}'), - Divider(height: 4.5,color: Colors.grey[500],) - ], - ), - ), - )), - SizedBox(height: 8,), - Container(width: double.infinity, - height: 100,color: Colors.white, + )), + SizedBox( + height: 8, + ), + Container( + width: double.infinity, + height: 100, + color: Colors.white, child: Row( - mainAxisSize:MainAxisSize.max, + mainAxisSize: MainAxisSize.max, 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.youtube.com/c/DrsulaimanAlhabibHospitals"); + 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: () { setState(() { - - launch("https://twitter.com/HMG"); + launch("https://twitter.com/HMG"); }); }, ), 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 f127f842..5dc44019 100644 --- a/lib/pages/ContactUs/findus/pharmacies_page.dart +++ b/lib/pages/ContactUs/findus/pharmacies_page.dart @@ -1,4 +1,5 @@ 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/widgets/buttons/button.dart'; @@ -11,6 +12,9 @@ import 'package:maps_launcher/maps_launcher.dart'; import 'package:url_launcher/url_launcher.dart'; class PharmaciesPage extends StatefulWidget { + final List findusPharmaciesModelList; + + PharmaciesPage({Key key, this.findusPharmaciesModelList}); @override _PharmaciesPageState createState() => _PharmaciesPageState(); } @@ -18,216 +22,248 @@ class PharmaciesPage extends StatefulWidget { class _PharmaciesPageState extends State { @override Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.getFindUsRequestOrders(), //model.getCOC(), - builder: (_, model, widget) => AppScaffold( - baseViewModel: model, - body: SingleChildScrollView( - child: Container( - margin: EdgeInsets.only(left: 15, right: 15, top: 70), - child: Column( - children: [ - ...List.generate( - model.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(model.FindusPharmaciesModelList[index].locationName, - style: TextStyle( - fontSize: 22.0, fontWeight: FontWeight.w600), - ),image:Image.network(model.FindusPharmaciesModelList[index].projectImageURL.toString(), 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(model - .FindusPharmaciesModelList[ - index] - .projectImageURL - .toString())), - ), - Expanded( - flex: 4, - child: Container( - margin: EdgeInsets.only( - left: 5, right: 5), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Texts( - '${model.FindusPharmaciesModelList[index].locationName}', - textAlign: TextAlign.start, - ), - SizedBox(height: 4,), - Texts( - '${model.FindusPharmaciesModelList[index].cityName}', - textAlign: TextAlign.center, - ), - ], - ), - ), - ), - //model.cOCItemList[index].cOCTitl - Expanded( - flex: 2, - child: Row( + return AppScaffold( + 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: [ - IconButton( - icon: Icon( - Icons - .person_pin_circle_outlined, - color: Colors.red, - ), - tooltip: - 'Increase volume by 10', - onPressed: () { - setState(() { - MapsLauncher.launchCoordinates( - double.parse(model - .FindusPharmaciesModelList[ - index] - .latitude), - double.parse(model - .FindusPharmaciesModelList[ - index] - .longitude), - model - .FindusPharmaciesModelList[ - index] - .locationName); - // _volume += 10; - }); - }, + Texts( + '${widget.findusPharmaciesModelList[index].locationName}', + textAlign: TextAlign.start, ), - IconButton( - icon: Icon( - Icons.phone, - color: Colors.red, - ), - tooltip: - 'Increase volume by 10', - onPressed: () { - setState(() { - // _volume += 10; - launch("tel://" + - model - .FindusPharmaciesModelList[ - index] - .phoneNumber); - }); - }, + 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 + // .person_pin_circle_outlined, + // color: Colors.red, + // ), + icon: new Image.asset( + 'assets/images/new-design/navigate.png'), + tooltip: '', + onPressed: () { + setState(() { + MapsLauncher.launchCoordinates( + double.parse(widget + .findusPharmaciesModelList[ + index] + .latitude), + double.parse(widget + .findusPharmaciesModelList[ + index] + .longitude), + widget + .findusPharmaciesModelList[ + index] + .locationName); + // _volume += 10; + }); + }, + ), + IconButton( + // icon: Icon( + // Icons.phone, + // color: Colors.red, + // ), + icon: new Image.asset( + 'assets/images/new-design/call.png'), + tooltip: 'I', + onPressed: () { + setState(() { + // _volume += 10; + launch("tel://" + + widget + .findusPharmaciesModelList[ + index] + .phoneNumber); + }); + }, + ), + ], + ), + ), + ], ), - ], - ), - - Divider( - height: 4.5, - color: Colors.grey[500], - ) - ], - ), + ), + ], + ), + Divider( + height: 4.5, + color: Colors.grey[500], + ) + ], ), - )), - 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"); - }); - }, - ), - IconButton( - icon: new Image.asset( - 'assets/images/new-design/linkedin.png'), - tooltip: 'LinkedIn', - iconSize: 70, - onPressed: () { - setState(() { - launch( - "https://www.youtube.com/c/DrsulaimanAlhabibHospitals"); - }); - }, - ), - IconButton( - icon: new Image.asset( - 'assets/images/new-design/twitter.png'), - tooltip: 'Twitter', - iconSize: 70, - onPressed: () { - setState(() { - launch("https://twitter.com/HMG"); - }); - }, - ), - IconButton( - 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"); - }); - }, - ), - ], - ), + ), + )), + 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"); + }); + }, + ), + 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"); + }); + }, + ), + IconButton( + icon: new Image.asset( + 'assets/images/new-design/twitter.png'), + tooltip: 'Twitter', + iconSize: 70, + onPressed: () { + setState(() { + launch("https://twitter.com/HMG"); + }); + }, + ), + IconButton( + 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"); + }); + }, + ), + ], ), - ], - ), + ), + ], ), ), ),