diff --git a/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart b/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart new file mode 100644 index 00000000..96dd5309 --- /dev/null +++ b/lib/pages/ContactUs/LiveChat/hospitalsLivechat_page.dart @@ -0,0 +1,232 @@ +import 'package:diplomaticquarterapp/core/viewModels/contactus/findus_view_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/contactus/livechat_view_model.dart'; +import 'package:diplomaticquarterapp/pages/base/base_view.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'; +import 'package:flutter/cupertino.dart'; +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 HospitalsLiveChatPage extends StatefulWidget { + @override + _HospitalsLiveChatPageState createState() => _HospitalsLiveChatPageState(); +} +//bool viewObject = true; + +class _HospitalsLiveChatPageState extends State { +int tappedIndex; + +@override + void initState() + { + super.initState(); + tappedIndex=0; + } + + + // changeStyle(){ + // + // setState(() { + // //viewObject = false ; + // }); + // // print(viewObject); + // } + + + + @override + + Widget build(BuildContext context) { + return BaseView( + onModelReady: (model) => model.getLiveChatRequestOrders(),//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.LiveChatModelList.length, (index) => Container(//FindusHospitalModelList.length + 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: [ + + InkWell( + onTap: (){ + print(model.LiveChatModelList[index].value); + print(model.user.patientID); + print(model.user.firstName); + //changeStyle(); + setState(() { + //viewObject = false ; + tappedIndex=index; + }); + // launch("http://chat.dshmg.com:7788/hmgchatapp/hmgchattest/Index.aspx?Name=TAMER&PatientID=1231755&MobileNo=537503378&Language=en&WorkGroup=Dubai_Eng_Chat"); + + }, + child: Row( + mainAxisAlignment: + MainAxisAlignment.end, + + children: [ + Expanded( + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + crossAxisAlignment: + CrossAxisAlignment.center, + 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.LiveChatModelList[index].projectName}',textAlign: TextAlign.center,))),//model.cOCItemList[index].cOCTitl + Expanded( + flex: 1, + 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; + // }); + // }, + // ), + IconButton( + icon: Icon(Icons.arrow_forward_rounded,color: Colors.black,), + tooltip: 'Increase volume by 10', + onPressed: () { + setState(() { + // _volume += 10; + // launch("tel://" +model.FindusHospitalModelList[index].phoneNumber); + }); + }, + ), + ], + ), + ), + + + + ], + ), + ), + + ], + ), + ) + + // Texts('${model.FindusHospitalModelList[index].locationName}'), + //Divider(height: 4.5,color: Colors.grey[500],) + + + ], + + ), + + ), + ) + ), + SizedBox(height: 15,), + 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(() { + + 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"); + }); + }, + ), + ], + ), + ), + ], + ), + ), + ), + + ), + ); + + } + +}