Merge branch 'sultan' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into mohammad
Conflicts: lib/main.dartmerge-requests/140/head
commit
270d7ffa6d
@ -1,8 +1,9 @@
|
|||||||
final TOKEN = 'token';
|
final TOKEN = 'token';
|
||||||
final PROJECT_ID='projectID';
|
final PROJECT_ID = 'projectID';
|
||||||
//===========amjad============
|
//===========amjad============
|
||||||
final DOCTOR_ID='doctorID';
|
final DOCTOR_ID = 'doctorID';
|
||||||
//=======================
|
//=======================
|
||||||
final SLECTED_PATIENT_TYPE='slectedPatientType';
|
final SLECTED_PATIENT_TYPE = 'slectedPatientType';
|
||||||
final APP_Language = 'language';
|
final APP_Language = 'language';
|
||||||
final DOCTOR_PROFILE = 'doctorProfile';
|
final DOCTOR_PROFILE = 'doctorProfile';
|
||||||
|
final LIVE_CARE_PATIENT = 'livecare-patient-profile';
|
||||||
|
|||||||
@ -0,0 +1,49 @@
|
|||||||
|
class LiveCarePendingListRequest {
|
||||||
|
PatientData patientData;
|
||||||
|
int doctorID;
|
||||||
|
String sErServiceID;
|
||||||
|
int projectID;
|
||||||
|
int sourceID;
|
||||||
|
|
||||||
|
LiveCarePendingListRequest(
|
||||||
|
{this.patientData,
|
||||||
|
this.doctorID,
|
||||||
|
this.sErServiceID,
|
||||||
|
this.projectID,
|
||||||
|
this.sourceID});
|
||||||
|
|
||||||
|
LiveCarePendingListRequest.fromJson(Map<String, dynamic> json) {
|
||||||
|
patientData = new PatientData.fromJson(json['PatientData']);
|
||||||
|
|
||||||
|
doctorID = json['DoctorID'];
|
||||||
|
sErServiceID = json['SErServiceID'];
|
||||||
|
projectID = json['ProjectID'];
|
||||||
|
sourceID = json['SourceID'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['PatientData'] = this.patientData.toJson();
|
||||||
|
data['DoctorID'] = this.doctorID;
|
||||||
|
data['SErServiceID'] = this.sErServiceID;
|
||||||
|
data['ProjectID'] = this.projectID;
|
||||||
|
data['SourceID'] = this.sourceID;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class PatientData {
|
||||||
|
bool isOutKSA;
|
||||||
|
|
||||||
|
PatientData({this.isOutKSA});
|
||||||
|
|
||||||
|
PatientData.fromJson(Map<String, dynamic> json) {
|
||||||
|
isOutKSA = json['IsOutKSA'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['IsOutKSA'] = this.isOutKSA;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,168 @@
|
|||||||
|
class LiveCarePendingListResponse {
|
||||||
|
Null acceptedBy;
|
||||||
|
Null acceptedOn;
|
||||||
|
int age;
|
||||||
|
Null appointmentNo;
|
||||||
|
String arrivalTime;
|
||||||
|
String arrivalTimeD;
|
||||||
|
int callStatus;
|
||||||
|
String clientRequestID;
|
||||||
|
String clinicName;
|
||||||
|
Null consoltationEnd;
|
||||||
|
Null consultationNotes;
|
||||||
|
Null createdOn;
|
||||||
|
String dateOfBirth;
|
||||||
|
String deviceToken;
|
||||||
|
String deviceType;
|
||||||
|
Null doctorName;
|
||||||
|
String editOn;
|
||||||
|
String gender;
|
||||||
|
bool isFollowUP;
|
||||||
|
Null isFromVida;
|
||||||
|
int isLoginB;
|
||||||
|
bool isOutKSA;
|
||||||
|
int isRejected;
|
||||||
|
String language;
|
||||||
|
double latitude;
|
||||||
|
double longitude;
|
||||||
|
String mobileNumber;
|
||||||
|
Null openSession;
|
||||||
|
Null openTokenID;
|
||||||
|
String patientID;
|
||||||
|
String patientName;
|
||||||
|
int patientStatus;
|
||||||
|
String preferredLanguage;
|
||||||
|
int projectID;
|
||||||
|
int scoring;
|
||||||
|
int serviceID;
|
||||||
|
Null tokenID;
|
||||||
|
int vCID;
|
||||||
|
String voipToken;
|
||||||
|
|
||||||
|
LiveCarePendingListResponse(
|
||||||
|
{this.acceptedBy,
|
||||||
|
this.acceptedOn,
|
||||||
|
this.age,
|
||||||
|
this.appointmentNo,
|
||||||
|
this.arrivalTime,
|
||||||
|
this.arrivalTimeD,
|
||||||
|
this.callStatus,
|
||||||
|
this.clientRequestID,
|
||||||
|
this.clinicName,
|
||||||
|
this.consoltationEnd,
|
||||||
|
this.consultationNotes,
|
||||||
|
this.createdOn,
|
||||||
|
this.dateOfBirth,
|
||||||
|
this.deviceToken,
|
||||||
|
this.deviceType,
|
||||||
|
this.doctorName,
|
||||||
|
this.editOn,
|
||||||
|
this.gender,
|
||||||
|
this.isFollowUP,
|
||||||
|
this.isFromVida,
|
||||||
|
this.isLoginB,
|
||||||
|
this.isOutKSA,
|
||||||
|
this.isRejected,
|
||||||
|
this.language,
|
||||||
|
this.latitude,
|
||||||
|
this.longitude,
|
||||||
|
this.mobileNumber,
|
||||||
|
this.openSession,
|
||||||
|
this.openTokenID,
|
||||||
|
this.patientID,
|
||||||
|
this.patientName,
|
||||||
|
this.patientStatus,
|
||||||
|
this.preferredLanguage,
|
||||||
|
this.projectID,
|
||||||
|
this.scoring,
|
||||||
|
this.serviceID,
|
||||||
|
this.tokenID,
|
||||||
|
this.vCID,
|
||||||
|
this.voipToken});
|
||||||
|
|
||||||
|
LiveCarePendingListResponse.fromJson(Map<String, dynamic> json) {
|
||||||
|
acceptedBy = json['AcceptedBy'];
|
||||||
|
acceptedOn = json['AcceptedOn'];
|
||||||
|
age = json['Age'];
|
||||||
|
appointmentNo = json['AppointmentNo'];
|
||||||
|
arrivalTime = json['ArrivalTime'];
|
||||||
|
arrivalTimeD = json['ArrivalTimeD'];
|
||||||
|
callStatus = json['CallStatus'];
|
||||||
|
clientRequestID = json['ClientRequestID'];
|
||||||
|
clinicName = json['ClinicName'];
|
||||||
|
consoltationEnd = json['ConsoltationEnd'];
|
||||||
|
consultationNotes = json['ConsultationNotes'];
|
||||||
|
createdOn = json['CreatedOn'];
|
||||||
|
dateOfBirth = json['DateOfBirth'];
|
||||||
|
deviceToken = json['DeviceToken'];
|
||||||
|
deviceType = json['DeviceType'];
|
||||||
|
doctorName = json['DoctorName'];
|
||||||
|
editOn = json['EditOn'];
|
||||||
|
gender = json['Gender'];
|
||||||
|
isFollowUP = json['IsFollowUP'];
|
||||||
|
isFromVida = json['IsFromVida'];
|
||||||
|
isLoginB = json['IsLoginB'];
|
||||||
|
isOutKSA = json['IsOutKSA'];
|
||||||
|
isRejected = json['IsRejected'];
|
||||||
|
language = json['Language'];
|
||||||
|
latitude = json['Latitude'];
|
||||||
|
longitude = json['Longitude'];
|
||||||
|
mobileNumber = json['MobileNumber'];
|
||||||
|
openSession = json['OpenSession'];
|
||||||
|
openTokenID = json['OpenTokenID'];
|
||||||
|
patientID = json['PatientID'];
|
||||||
|
patientName = json['PatientName'];
|
||||||
|
patientStatus = json['PatientStatus'];
|
||||||
|
preferredLanguage = json['PreferredLanguage'];
|
||||||
|
projectID = json['ProjectID'];
|
||||||
|
scoring = json['Scoring'];
|
||||||
|
serviceID = json['ServiceID'];
|
||||||
|
tokenID = json['TokenID'];
|
||||||
|
vCID = json['VC_ID'];
|
||||||
|
voipToken = json['VoipToken'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['AcceptedBy'] = this.acceptedBy;
|
||||||
|
data['AcceptedOn'] = this.acceptedOn;
|
||||||
|
data['Age'] = this.age;
|
||||||
|
data['AppointmentNo'] = this.appointmentNo;
|
||||||
|
data['ArrivalTime'] = this.arrivalTime;
|
||||||
|
data['ArrivalTimeD'] = this.arrivalTimeD;
|
||||||
|
data['CallStatus'] = this.callStatus;
|
||||||
|
data['ClientRequestID'] = this.clientRequestID;
|
||||||
|
data['ClinicName'] = this.clinicName;
|
||||||
|
data['ConsoltationEnd'] = this.consoltationEnd;
|
||||||
|
data['ConsultationNotes'] = this.consultationNotes;
|
||||||
|
data['CreatedOn'] = this.createdOn;
|
||||||
|
data['DateOfBirth'] = this.dateOfBirth;
|
||||||
|
data['DeviceToken'] = this.deviceToken;
|
||||||
|
data['DeviceType'] = this.deviceType;
|
||||||
|
data['DoctorName'] = this.doctorName;
|
||||||
|
data['EditOn'] = this.editOn;
|
||||||
|
data['Gender'] = this.gender;
|
||||||
|
data['IsFollowUP'] = this.isFollowUP;
|
||||||
|
data['IsFromVida'] = this.isFromVida;
|
||||||
|
data['IsLoginB'] = this.isLoginB;
|
||||||
|
data['IsOutKSA'] = this.isOutKSA;
|
||||||
|
data['IsRejected'] = this.isRejected;
|
||||||
|
data['Language'] = this.language;
|
||||||
|
data['Latitude'] = this.latitude;
|
||||||
|
data['Longitude'] = this.longitude;
|
||||||
|
data['MobileNumber'] = this.mobileNumber;
|
||||||
|
data['OpenSession'] = this.openSession;
|
||||||
|
data['OpenTokenID'] = this.openTokenID;
|
||||||
|
data['PatientID'] = this.patientID;
|
||||||
|
data['PatientName'] = this.patientName;
|
||||||
|
data['PatientStatus'] = this.patientStatus;
|
||||||
|
data['PreferredLanguage'] = this.preferredLanguage;
|
||||||
|
data['ProjectID'] = this.projectID;
|
||||||
|
data['Scoring'] = this.scoring;
|
||||||
|
data['ServiceID'] = this.serviceID;
|
||||||
|
data['TokenID'] = this.tokenID;
|
||||||
|
data['VC_ID'] = this.vCID;
|
||||||
|
data['VoipToken'] = this.voipToken;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,56 @@
|
|||||||
|
class StartCallReq {
|
||||||
|
int vCID;
|
||||||
|
bool isrecall;
|
||||||
|
String tokenID;
|
||||||
|
String generalid;
|
||||||
|
int doctorId;
|
||||||
|
bool isOutKsa;
|
||||||
|
String projectName;
|
||||||
|
String docotrName;
|
||||||
|
String clincName;
|
||||||
|
String docSpec;
|
||||||
|
int clinicId;
|
||||||
|
|
||||||
|
StartCallReq(
|
||||||
|
{this.vCID,
|
||||||
|
this.isrecall,
|
||||||
|
this.tokenID,
|
||||||
|
this.generalid,
|
||||||
|
this.doctorId,
|
||||||
|
this.isOutKsa,
|
||||||
|
this.projectName,
|
||||||
|
this.docotrName,
|
||||||
|
this.clincName,
|
||||||
|
this.docSpec,
|
||||||
|
this.clinicId});
|
||||||
|
|
||||||
|
StartCallReq.fromJson(Map<String, dynamic> json) {
|
||||||
|
vCID = json['VC_ID'];
|
||||||
|
isrecall = json['isrecall'];
|
||||||
|
tokenID = json['TokenID'];
|
||||||
|
generalid = json['generalid'];
|
||||||
|
doctorId = json['DoctorId'];
|
||||||
|
isOutKsa = json['IsOutKsa'];
|
||||||
|
projectName = json['projectName'];
|
||||||
|
docotrName = json['DocotrName'];
|
||||||
|
clincName = json['clincName'];
|
||||||
|
docSpec = json['Doc_Spec'];
|
||||||
|
clinicId = json['ClinicId'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['VC_ID'] = this.vCID;
|
||||||
|
data['isrecall'] = this.isrecall;
|
||||||
|
data['TokenID'] = this.tokenID;
|
||||||
|
data['generalid'] = this.generalid;
|
||||||
|
data['DoctorId'] = this.doctorId;
|
||||||
|
data['IsOutKsa'] = this.isOutKsa;
|
||||||
|
data['projectName'] = this.projectName;
|
||||||
|
data['DocotrName'] = this.docotrName;
|
||||||
|
data['clincName'] = this.clincName;
|
||||||
|
data['Doc_Spec'] = this.docSpec;
|
||||||
|
data['ClinicId'] = this.clinicId;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,78 @@
|
|||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:doctor_app_flutter/client/base_app_client.dart';
|
||||||
|
import 'package:doctor_app_flutter/config/config.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/livecare/get_panding_req_list.dart';
|
||||||
|
import 'package:doctor_app_flutter/models/livecare/start_call_req.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/helpers.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
|
||||||
|
|
||||||
|
class LiveCareProvider with ChangeNotifier {
|
||||||
|
DrAppSharedPreferances sharedPref = new DrAppSharedPreferances();
|
||||||
|
|
||||||
|
var liveCarePendingList = [];
|
||||||
|
var inCallResponse = {};
|
||||||
|
bool isFinished = true;
|
||||||
|
bool hasError = false;
|
||||||
|
String errorMsg = '';
|
||||||
|
|
||||||
|
LiveCarePendingListRequest _pendingRequestModel =
|
||||||
|
LiveCarePendingListRequest();
|
||||||
|
|
||||||
|
Future<List> getpendingList() async {
|
||||||
|
var profile = await sharedPref.getObj(DOCTOR_PROFILE);
|
||||||
|
_pendingRequestModel.projectID = await sharedPref.getInt(PROJECT_ID);
|
||||||
|
_pendingRequestModel.doctorID = profile['DoctorID'];
|
||||||
|
_pendingRequestModel.sErServiceID = "1,3";
|
||||||
|
_pendingRequestModel.sourceID = 1;
|
||||||
|
_pendingRequestModel.patientData = PatientData(isOutKSA: false);
|
||||||
|
resetDefaultValues();
|
||||||
|
// dynamic localRes;
|
||||||
|
await BaseAppClient.post(GET_LIVECARE_PENDINGLIST,
|
||||||
|
onSuccess: (response, statusCode) async {
|
||||||
|
isFinished = true;
|
||||||
|
liveCarePendingList = response["List_PendingPatientList"];
|
||||||
|
}, onFailure: (String error, int statusCode) {
|
||||||
|
isFinished = true;
|
||||||
|
throw error;
|
||||||
|
}, body: _pendingRequestModel.toJson());
|
||||||
|
return Future.value(liveCarePendingList);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<Map> startCall(request, bool isReCall) async {
|
||||||
|
var profile = await sharedPref.getObj(DOCTOR_PROFILE);
|
||||||
|
resetDefaultValues();
|
||||||
|
/* the request model is not same hence added manually */
|
||||||
|
var newRequest = new StartCallReq();
|
||||||
|
newRequest.clinicId = profile["ClinicID"];
|
||||||
|
newRequest.vCID = request["VC_ID"];
|
||||||
|
newRequest.isrecall = isReCall;
|
||||||
|
newRequest.doctorId = profile["DoctorID"];
|
||||||
|
newRequest.isOutKsa = request["IsOutKSA"];
|
||||||
|
newRequest.projectName = profile["ProjectName"];
|
||||||
|
newRequest.docotrName = profile["DoctorName"];
|
||||||
|
newRequest.clincName = profile["ClinicDescription"];
|
||||||
|
newRequest.clincName = profile["ClinicDescription"];
|
||||||
|
newRequest.docSpec = profile["DoctorTitleForProfile"];
|
||||||
|
newRequest.generalid = 'Cs2020@2016\$2958';
|
||||||
|
isFinished = false;
|
||||||
|
await BaseAppClient.post(START_LIVECARE_CALL,
|
||||||
|
onSuccess: (response, statusCode) async {
|
||||||
|
isFinished = true;
|
||||||
|
inCallResponse = response;
|
||||||
|
}, onFailure: (String error, int statusCode) {
|
||||||
|
isFinished = true;
|
||||||
|
throw error;
|
||||||
|
}, body: newRequest.toJson());
|
||||||
|
return Future.value(inCallResponse);
|
||||||
|
}
|
||||||
|
|
||||||
|
resetDefaultValues() {
|
||||||
|
isFinished = false;
|
||||||
|
hasError = false;
|
||||||
|
errorMsg = '';
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,235 @@
|
|||||||
|
import 'dart:async';
|
||||||
|
|
||||||
|
import 'package:doctor_app_flutter/providers/livecare_provider.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
|
||||||
|
import 'package:doctor_app_flutter/util/helpers.dart';
|
||||||
|
|
||||||
|
class VideoCallPage extends StatefulWidget {
|
||||||
|
@override
|
||||||
|
_VideoCallPageState createState() => _VideoCallPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
DrAppSharedPreferances sharedPref = DrAppSharedPreferances();
|
||||||
|
|
||||||
|
class _VideoCallPageState extends State<VideoCallPage> {
|
||||||
|
Timer _timmerInstance;
|
||||||
|
int _start = 0;
|
||||||
|
String _timmer = '';
|
||||||
|
LiveCareProvider _liveCareProvider;
|
||||||
|
bool _isInit = true;
|
||||||
|
var patientData = {};
|
||||||
|
String image_url = 'https://hmgwebservices.com/Images/MobileImages/DUBAI/';
|
||||||
|
//bool _isOutOfStuck = false;
|
||||||
|
Helpers helpers = new Helpers();
|
||||||
|
@override
|
||||||
|
void didChangeDependencies() {
|
||||||
|
super.didChangeDependencies();
|
||||||
|
if (_isInit) {
|
||||||
|
_liveCareProvider = Provider.of<LiveCareProvider>(context);
|
||||||
|
startCall();
|
||||||
|
}
|
||||||
|
_isInit = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void connectOpenTok(tokenData) {
|
||||||
|
/* opentok functionalites need to be written */
|
||||||
|
print(tokenData["OpenSessionID"]);
|
||||||
|
print(tokenData["OpenTokenID"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
String getTimerTime(int start) {
|
||||||
|
int minutes = (start ~/ 60);
|
||||||
|
String sMinute = '';
|
||||||
|
if (minutes.toString().length == 1) {
|
||||||
|
sMinute = '0' + minutes.toString();
|
||||||
|
} else
|
||||||
|
sMinute = minutes.toString();
|
||||||
|
|
||||||
|
int seconds = (start % 60);
|
||||||
|
String sSeconds = '';
|
||||||
|
if (seconds.toString().length == 1) {
|
||||||
|
sSeconds = '0' + seconds.toString();
|
||||||
|
} else
|
||||||
|
sSeconds = seconds.toString();
|
||||||
|
|
||||||
|
return sMinute + ':' + sSeconds;
|
||||||
|
}
|
||||||
|
|
||||||
|
startCall() async {
|
||||||
|
patientData = await sharedPref.getObj(LIVE_CARE_PATIENT);
|
||||||
|
_liveCareProvider.startCall(patientData, false).then((result) {
|
||||||
|
connectOpenTok(result);
|
||||||
|
}).catchError((error) =>
|
||||||
|
{helpers.showErrorToast(error), Navigator.of(context).pop()});
|
||||||
|
}
|
||||||
|
|
||||||
|
// @override
|
||||||
|
// void initState() {
|
||||||
|
// super.initState();
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
body: SafeArea(
|
||||||
|
child: Container(
|
||||||
|
height: MediaQuery.of(context).size.height * 1.09,
|
||||||
|
// width: MediaQuery.of(context).size.width,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
padding: EdgeInsets.all(50.0),
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: <Widget>[
|
||||||
|
SizedBox(
|
||||||
|
height: 10.0,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'Calling',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.deepPurpleAccent,
|
||||||
|
fontWeight: FontWeight.w300,
|
||||||
|
fontSize: 15),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: MediaQuery.of(context).size.height * 0.02,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
patientData["PatientName"],
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.deepPurpleAccent,
|
||||||
|
fontWeight: FontWeight.w900,
|
||||||
|
fontSize: 20),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: MediaQuery.of(context).size.height * 0.02,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
child: Text(
|
||||||
|
_timmer == '' ? 'Connecting' : 'Connected',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.deepPurpleAccent,
|
||||||
|
fontWeight: FontWeight.w300,
|
||||||
|
fontSize: 15),
|
||||||
|
)),
|
||||||
|
SizedBox(
|
||||||
|
height: MediaQuery.of(context).size.height * 0.02,
|
||||||
|
),
|
||||||
|
ClipRRect(
|
||||||
|
borderRadius: BorderRadius.circular(200.0),
|
||||||
|
child: Image.network(
|
||||||
|
patientData["Gender"] == "1"
|
||||||
|
? image_url + 'unkown.png'
|
||||||
|
: image_url + 'unkowwn_female.png',
|
||||||
|
height: 200.0,
|
||||||
|
width: 200.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: MediaQuery.of(context).size.height * 0.02,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: <Widget>[
|
||||||
|
FunctionalButton(
|
||||||
|
title: 'Speaker',
|
||||||
|
icon: Icons.phone_in_talk,
|
||||||
|
onPressed: () {},
|
||||||
|
),
|
||||||
|
FunctionalButton(
|
||||||
|
title: 'Flip',
|
||||||
|
icon: Icons.flip_to_back,
|
||||||
|
onPressed: () {},
|
||||||
|
),
|
||||||
|
FunctionalButton(
|
||||||
|
title: 'Mute',
|
||||||
|
icon: Icons.mic_off,
|
||||||
|
onPressed: () {},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: MediaQuery.of(context).size.height * 0.1,
|
||||||
|
),
|
||||||
|
FloatingActionButton(
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
},
|
||||||
|
elevation: 20.0,
|
||||||
|
shape: CircleBorder(side: BorderSide(color: Colors.red)),
|
||||||
|
mini: false,
|
||||||
|
child: Icon(
|
||||||
|
Icons.call_end,
|
||||||
|
color: Colors.red,
|
||||||
|
),
|
||||||
|
backgroundColor: Colors.red[100],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class FunctionalButton extends StatefulWidget {
|
||||||
|
final title;
|
||||||
|
final icon;
|
||||||
|
final Function() onPressed;
|
||||||
|
|
||||||
|
const FunctionalButton({Key key, this.title, this.icon, this.onPressed})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
_FunctionalButtonState createState() => _FunctionalButtonState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _FunctionalButtonState extends State<FunctionalButton> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: <Widget>[
|
||||||
|
RawMaterialButton(
|
||||||
|
onPressed: widget.onPressed,
|
||||||
|
splashColor: Colors.deepPurpleAccent,
|
||||||
|
fillColor: Colors.white,
|
||||||
|
elevation: 10.0,
|
||||||
|
shape: CircleBorder(),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(15.0),
|
||||||
|
child: Icon(
|
||||||
|
widget.icon,
|
||||||
|
size: 30.0,
|
||||||
|
color: Colors.deepPurpleAccent,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.symmetric(vertical: 10.0, horizontal: 2.0),
|
||||||
|
child: Text(
|
||||||
|
widget.title,
|
||||||
|
style: TextStyle(fontSize: 15.0, color: Colors.deepPurpleAccent),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue