Contact us

find_us
Amjad amireh 6 years ago
parent 24693f2992
commit 24456895ee

@ -10,40 +10,36 @@ import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
class HospitalsLiveChatPage extends StatefulWidget { class HospitalsLiveChatPage extends StatefulWidget {
@override @override
_HospitalsLiveChatPageState createState() => _HospitalsLiveChatPageState(); _HospitalsLiveChatPageState createState() => _HospitalsLiveChatPageState();
} }
class _HospitalsLiveChatPageState extends State<HospitalsLiveChatPage> { class _HospitalsLiveChatPageState extends State<HospitalsLiveChatPage> {
int tappedIndex; int tappedIndex;
String chat; String chat;
@override @override
void initState() void initState() {
{
super.initState(); super.initState();
tappedIndex=-1; tappedIndex = -1;
chat=""; chat = "";
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<LiveChatViewModel>( return BaseView<LiveChatViewModel>(
onModelReady: (model) => model.getLiveChatRequestOrders(),//getFindUsRequestOrders(),//model.getCOC(), onModelReady: (model) => model.getLiveChatRequestOrders(),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
baseViewModel: model, baseViewModel: model,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
margin: EdgeInsets.only(left: 15,right: 15), margin: EdgeInsets.only(left: 15, right: 15),
child: Column( child: Column(
children: [ children: [
SizedBox(height: 20,), SizedBox(
height: 20,
),
Container( Container(
width: double.infinity, width: double.infinity,
height: 200, height: 200,
@ -53,110 +49,98 @@ String chat;
'assets/images/dashboard_top_bg.png'), 'assets/images/dashboard_top_bg.png'),
fit: BoxFit.cover), fit: BoxFit.cover),
), ),
child: Texts('You can now talk directly to the appointments department by chat or request a call back',color: Colors.white,textAlign: TextAlign.center,), child: Texts(
'You can now talk directly to the appointments department by chat or request a call back',
color: Colors.white,
textAlign: TextAlign.center,
),
), ),
/////////// ///////////
...List.generate(model.LiveChatModelList.length, (index) => ...List.generate(
Container(//FindusHospitalModelList.length model.LiveChatModelList.length,
margin: EdgeInsets.only(left: 20, right: 20, bottom: 20), (index) => Container(
margin:
EdgeInsets.only(left: 20, right: 20, bottom: 20),
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
border: Border.all(color: Colors.white, width: 0.5), border: Border.all(color: Colors.white, width: 0.5),
borderRadius: BorderRadius.all(Radius.circular(5)), borderRadius: BorderRadius.all(Radius.circular(5)),
color: tappedIndex==index ? Colors.red:Colors.white , color: tappedIndex == index
? Colors.red
: Colors.white,
), ),
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
InkWell( InkWell(
onTap: (){ onTap: () {
print(model.LiveChatModelList[index].value);
print(model.user.patientID);
print(model.user.firstName);
print(model.user.phoneOffice);
//changeStyle();
setState(() { setState(() {
tappedIndex = index;
tappedIndex=index; chat =
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}"; "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}";
}); });
// launch("http://chat.dshmg.com:7788/hmgchatapp/hmgchattest/Index.aspx?Name=TAMER&PatientID=1231755&MobileNo=537503378&Language=en&WorkGroup=Dubai_Eng_Chat");
// print("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( child: Row(
mainAxisAlignment: mainAxisAlignment: MainAxisAlignment.end,
MainAxisAlignment.end,
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment:
MainAxisAlignment.spaceAround,
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.center, CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
flex: 4, flex: 4,
child: Container( child: Container(
margin: EdgeInsets.only(
margin: EdgeInsets.only(left: 5,right: 5), left: 5, right: 5),
child: Texts('${model.LiveChatModelList[index].projectName}',color:tappedIndex==index ? Colors.white:Colors.black,textAlign: TextAlign.center,))),//model.cOCItemList[index].cOCTitl child: Texts(
'${model.LiveChatModelList[index].projectName}',
color:
tappedIndex == index
? Colors.white
: Colors.black,
textAlign:
TextAlign.center,
))), //model.cOCItemList[index].cOCTitl
Expanded( Expanded(
flex: 1, flex: 1,
child: Row( child: Row(
children: [ children: [
IconButton( IconButton(
icon: Icon(Icons.arrow_forward_rounded,color: tappedIndex==index ? Colors.white:Colors.black,), icon: Icon(
Icons
.arrow_forward_rounded,
color:
tappedIndex == index
? Colors.white
: Colors.black,
),
tooltip: '', tooltip: '',
onPressed: () { onPressed: () {
setState(() { setState(() {});
// _volume += 10;
// launch("tel://" +model.FindusHospitalModelList[index].phoneNumber);
});
}, },
), ),
], ],
), ),
), ),
], ],
), ),
), ),
], ],
), ),
) )
], ],
), ),
), ),
) )),
SizedBox(
height: 100,
), ),
SizedBox(height: 100,),
], ],
), ),
), ),
), ),
@ -172,17 +156,14 @@ String chat;
label: 'ٍStart', label: 'ٍStart',
loading: model.state == ViewState.BusyLocal, loading: model.state == ViewState.BusyLocal,
onTap: () { onTap: () {
print("chat="+chat); print("chat=" + chat);
launch(chat); launch(chat);
}, },
), ),
), ),
), ),
), ),
), ),
); );
} }
} }

@ -1,10 +1,6 @@
import 'dart:ui'; import 'dart:ui';
import 'package:diplomaticquarterapp/pages/ContactUs/LiveChat/pharmaciesLivechat_page.dart'; import 'package:diplomaticquarterapp/pages/ContactUs/LiveChat/pharmaciesLivechat_page.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/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';

Loading…
Cancel
Save