From 5ce252d296866a4f2f67afff34340d32269fdba5 Mon Sep 17 00:00:00 2001 From: Amjad amireh Date: Sun, 27 Sep 2020 17:03:05 +0300 Subject: [PATCH] Contact us --- .../LiveChat/hospitalsLivechat_page.dart | 180 ++++++++++-------- .../ContactUs/LiveChat/livechat_page.dart | 10 +- 2 files changed, 105 insertions(+), 85 deletions(-) diff --git a/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart b/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart index 66ad31ee..0c17e637 100644 --- a/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart +++ b/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart @@ -36,110 +36,124 @@ 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, + 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.start, children: [ - Expanded( - child: Row( - mainAxisAlignment: - MainAxisAlignment.spaceAround, - crossAxisAlignment: - CrossAxisAlignment.center, + 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.spaceAround, + crossAxisAlignment: CrossAxisAlignment.center, children: [ + SizedBox(width: 20,), 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, + tappedIndex == index + ? Colors.white + : Colors.black, textAlign: - TextAlign.center, + TextAlign.center, ))), //model.cOCItemList[index].cOCTitl - Expanded( - flex: 1, - child: Row( - children: [ - IconButton( - icon: Icon( - Icons - .arrow_forward_rounded, - color: - tappedIndex == index - ? Colors.white - : Colors.black, - ), - tooltip: '', - onPressed: () { - setState(() {}); - }, - ), - ], + IconButton( + icon: Icon( + Icons + .arrow_forward_rounded, + color: + tappedIndex == index + ? Colors.white + : Colors.black, ), + tooltip: '', + onPressed: () { + setState(() {}); + }, ), ], ), - ), + ) ], ), - ) - ], - ), - ), - )), - SizedBox( - height: 100, + ), + )), + ], + ),), + ), + ], ), + Container( + height: MediaQuery.of(context).size.height * 0.20, + width: double.maxFinite, + ) ], ), ), @@ -167,3 +181,7 @@ class _HospitalsLiveChatPageState extends State { ); } } + + + + diff --git a/lib/pages/ContactUs/LiveChat/livechat_page.dart b/lib/pages/ContactUs/LiveChat/livechat_page.dart index 154a03cd..20cd1181 100644 --- a/lib/pages/ContactUs/LiveChat/livechat_page.dart +++ b/lib/pages/ContactUs/LiveChat/livechat_page.dart @@ -56,12 +56,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 +69,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(