Contact us

merge-update-with-lab-changes
Amjad amireh 6 years ago
parent 24693f2992
commit 24456895ee

@ -10,179 +10,160 @@ 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
void initState()
{
super.initState();
tappedIndex=-1;
chat="";
}
@override @override
void initState() {
super.initState();
tappedIndex = -1;
chat = "";
}
Widget build(BuildContext context) { @override
return BaseView<LiveChatViewModel>( Widget build(BuildContext context) {
onModelReady: (model) => model.getLiveChatRequestOrders(),//getFindUsRequestOrders(),//model.getCOC(), return BaseView<LiveChatViewModel>(
builder: (_, model, widget) => AppScaffold( onModelReady: (model) => model.getLiveChatRequestOrders(),
baseViewModel: model, builder: (_, model, widget) => AppScaffold(
body: SingleChildScrollView( baseViewModel: model,
child: Container( body: SingleChildScrollView(
margin: EdgeInsets.only(left: 15,right: 15), child: Container(
child: Column( margin: EdgeInsets.only(left: 15, right: 15),
children: [ child: Column(
SizedBox(height: 20,), children: [
Container( SizedBox(
width: double.infinity, height: 20,
height: 200, ),
decoration: BoxDecoration( Container(
image: DecorationImage( width: double.infinity,
image: ExactAssetImage( height: 200,
'assets/images/dashboard_top_bg.png'), decoration: BoxDecoration(
fit: BoxFit.cover), image: DecorationImage(
), image: ExactAssetImage(
child: Texts('You can now talk directly to the appointments department by chat or request a call back',color: Colors.white,textAlign: TextAlign.center,), 'assets/images/dashboard_top_bg.png'),
fit: BoxFit.cover),
), ),
/////////// child: Texts(
...List.generate(model.LiveChatModelList.length, (index) => 'You can now talk directly to the appointments department by chat or request a call back',
Container(//FindusHospitalModelList.length color: Colors.white,
margin: EdgeInsets.only(left: 20, right: 20, bottom: 20), textAlign: TextAlign.center,
decoration: BoxDecoration( ),
shape: BoxShape.rectangle, ),
border: Border.all(color: Colors.white, width: 0.5), ///////////
borderRadius: BorderRadius.all(Radius.circular(5)), ...List.generate(
color: tappedIndex==index ? Colors.red:Colors.white , model.LiveChatModelList.length,
), (index) => Container(
margin:
child: Padding( EdgeInsets.only(left: 20, right: 20, bottom: 20),
decoration: BoxDecoration(
padding: const EdgeInsets.all(8.0), shape: BoxShape.rectangle,
child: Column( border: Border.all(color: Colors.white, width: 0.5),
borderRadius: BorderRadius.all(Radius.circular(5)),
crossAxisAlignment: CrossAxisAlignment.start, color: tappedIndex == index
children: <Widget>[ ? Colors.red
: Colors.white,
InkWell( ),
onTap: (){ child: Padding(
print(model.LiveChatModelList[index].value); padding: const EdgeInsets.all(8.0),
print(model.user.patientID); child: Column(
print(model.user.firstName); crossAxisAlignment: CrossAxisAlignment.start,
print(model.user.phoneOffice);
//changeStyle();
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}";
});
// 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(
mainAxisAlignment:
MainAxisAlignment.end,
children: <Widget>[ children: <Widget>[
InkWell(
Expanded( 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( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment:
CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
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( Expanded(
flex: 1,
child: Row( child: Row(
children: [ mainAxisAlignment:
MainAxisAlignment.spaceAround,
IconButton( crossAxisAlignment:
icon: Icon(Icons.arrow_forward_rounded,color: tappedIndex==index ? Colors.white:Colors.black,), CrossAxisAlignment.center,
tooltip: '', children: <Widget>[
onPressed: () { Expanded(
setState(() { flex: 4,
// _volume += 10; child: Container(
// launch("tel://" +model.FindusHospitalModelList[index].phoneNumber); 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,
child: Row(
children: [
IconButton(
icon: Icon(
Icons
.arrow_forward_rounded,
color:
tappedIndex == index
? Colors.white
: Colors.black,
),
tooltip: '',
onPressed: () {
setState(() {});
},
),
],
),
), ),
], ],
), ),
), ),
], ],
), ),
), )
], ],
), ),
) ),
)),
SizedBox(
height: 100,
),
], ],
),
),
)
),
SizedBox(height: 100,),
],
),
), ),
), ),
bottomSheet: Container( ),
height: MediaQuery.of(context).size.height * 0.13, bottomSheet: Container(
width: double.infinity, height: MediaQuery.of(context).size.height * 0.13,
padding: EdgeInsets.all(8.0), width: double.infinity,
child: Center( padding: EdgeInsets.all(8.0),
child: Container( child: Center(
height: MediaQuery.of(context).size.height * 0.1, child: Container(
width: MediaQuery.of(context).size.width * 0.8, height: MediaQuery.of(context).size.height * 0.1,
child: Button( width: MediaQuery.of(context).size.width * 0.8,
label: 'ٍStart', child: Button(
loading: model.state == ViewState.BusyLocal, label: 'ٍStart',
onTap: () { loading: model.state == ViewState.BusyLocal,
print("chat="+chat); onTap: () {
launch(chat); print("chat=" + 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