Till AlJazan Demo

faiz_dev_structure_update
FaizHashmiCS22 2 years ago
parent 0027f88df5
commit 3025c26d94

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="28.704" height="36.818" viewBox="0 0 28.704 36.818">
<g id="doctor_10_" data-name="doctor (10)" transform="translate(-5.291)">
<path id="Path_5102" data-name="Path 5102" d="M21.572,0a8,8,0,1,0,7.994,8A8,8,0,0,0,21.572,0Z" transform="translate(-1.931)" fill="#52964f"/>
<path id="Path_5103" data-name="Path 5103" d="M25.819,23.474a17.6,17.6,0,0,1,.584,4.767c1.176,1.042,4.261,4.115,3.59,7.147a3.551,3.551,0,0,1-2.485,2.52.767.767,0,0,1-.5-1.452,2.072,2.072,0,0,0,1.477-1.362c.459-2.079-1.842-4.6-3.122-5.726-1.531.743-4.426,2.567-4.538,4.654a2.057,2.057,0,0,0,1.055,1.742.767.767,0,1,1-.863,1.269A3.545,3.545,0,0,1,19.3,33.9c.174-3.241,4.41-5.449,5.592-6a20.9,20.9,0,0,0-.759-4.869.855.855,0,0,1-.008-.125,13.292,13.292,0,0,0-3.5-.48H18.657a13.318,13.318,0,0,0-3.9.585.7.7,0,0,1-.043.164,33.366,33.366,0,0,0-2.471,8.754,3.142,3.142,0,1,1-1.546-.035,37.409,37.409,0,0,1,2.081-8.085A13.373,13.373,0,0,0,5.291,35.793v5.482a.766.766,0,0,0,.767.767h27.17A.776.776,0,0,0,34,41.264V35.793a13.392,13.392,0,0,0-8.177-12.319Z" transform="translate(0 -5.223)" fill="#52964f"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" width="36.818" height="36.818" viewBox="0 0 36.818 36.818">
<g id="_x30_6" transform="translate(-2 -2)">
<path id="Path_5097" data-name="Path 5097" d="M7.26,16.753a3.945,3.945,0,1,1,5.26,0v3.389c4.5-.973,5.26-4.465,5.26-6.683C17.779,8.9,14.633,2,9.89,2S2,8.9,2,13.459c0,2.218.761,5.71,5.26,6.683Z" transform="translate(0 0)" fill="#3c86d0"/>
<path id="Path_5098" data-name="Path 5098" d="M19.149,31.354a2.63,2.63,0,1,0-2.264-3.945H12.575a2.632,2.632,0,0,1-2.63-2.63V23.464a1.315,1.315,0,0,0,1.315-1.315V19.52A1.315,1.315,0,0,0,9.945,18.2V14.26a1.267,1.267,0,0,0-.067-.33,2.63,2.63,0,1,0-2.5,0,1.267,1.267,0,0,0-.067.33V18.2A1.315,1.315,0,0,0,6,19.52v2.63a1.315,1.315,0,0,0,1.315,1.315v1.315a5.266,5.266,0,0,0,5.26,5.26h4.311A2.621,2.621,0,0,0,19.149,31.354Z" transform="translate(1.26 2.205)" fill="#3c86d0"/>
<path id="Path_5099" data-name="Path 5099" d="M31.409,18H16.945A3.949,3.949,0,0,0,13,21.945V23.26h1.026a3.945,3.945,0,1,1,0,5.26H13v1.315a3.949,3.949,0,0,0,3.945,3.945H31.409a3.949,3.949,0,0,0,3.945-3.945v-7.89A3.949,3.949,0,0,0,31.409,18Zm-5.26,10.52a2.63,2.63,0,1,1,2.63-2.63A2.632,2.632,0,0,1,26.149,28.52Zm5.26-.657a.657.657,0,0,1-1.315,0V23.917a.657.657,0,0,1,1.315,0Zm2.63,0a.657.657,0,0,1-1.315,0V23.917a.657.657,0,1,1,1.315,0Z" transform="translate(3.464 5.039)" fill="#3c86d0"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="34.908" height="36.818" viewBox="0 0 34.908 36.818">
<path id="blood-test" d="M33.07,14.711H24.688v3.537H26.1a.522.522,0,0,1,0,1.043H24.688v2.618H27.95a.522.522,0,0,1,0,1.043H24.688V25.57H26.1a.522.522,0,0,1,0,1.043H24.688V30.6h4.62a10.235,10.235,0,0,0,4.806,5.97v4.011a5.235,5.235,0,0,1-10.47,0V14.7a2.079,2.079,0,0,1-1.829-2.06V11.075A2.078,2.078,0,0,1,23.89,9h9.978a2.078,2.078,0,0,1,2.075,2.075v1.562a2.079,2.079,0,0,1-1.829,2.06v4.042a10.224,10.224,0,0,0-1.043.669v-4.7ZM46.976,36.933l1.384-1.384a1.179,1.179,0,0,1,1.662,0l6.359,6.359a1.179,1.179,0,0,1,0,1.662L55,44.954a1.179,1.179,0,0,1-1.662,0l-6.359-6.359a1.179,1.179,0,0,1,0-1.662ZM39.082,21.193a6.463,6.463,0,1,0,6.463,6.463,6.463,6.463,0,0,0-6.463-6.463Zm1.5,9.109a2.125,2.125,0,0,1-3,0c-.824-.824-.609-2.474,0-3.468l1.5-2.442,1.5,2.442c.609.993.824,2.644,0,3.468Zm7.666-2.646a9.163,9.163,0,1,0-3.653,7.322l1.446,1.446a2.223,2.223,0,0,1,.2-.228l1.384-1.384a2.213,2.213,0,0,1,.228-.2L46.4,33.167a9.123,9.123,0,0,0,1.842-5.511Zm-9.164,7.506a7.506,7.506,0,1,1,7.506-7.506,7.506,7.506,0,0,1-7.506,7.506Z" transform="translate(-21.815 -9)" fill="#c99609" fill-rule="evenodd"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="36.819" height="36.819" viewBox="0 0 36.819 36.819">
<g id="syringe_3_" data-name="syringe (3)" transform="translate(0.002 0)">
<path id="Path_5100" data-name="Path 5100" d="M20.326,80.649A1.079,1.079,0,1,0,18.8,82.175l1.548,1.548L17.83,86.241l1.733,1.733A1.079,1.079,0,1,1,18.038,89.5L16.3,87.767l-2.518,2.518,1.733,1.733a1.079,1.079,0,1,1-1.525,1.525l-1.733-1.733L9.743,94.329l1.733,1.733A1.079,1.079,0,0,1,9.95,97.588L8.217,95.854,6.768,97.3a3.367,3.367,0,0,0-.993,2.4v4.373L.314,109.534A1.079,1.079,0,0,0,1.84,111.06L7.3,105.6h4.373a3.368,3.368,0,0,0,2.4-.993l13.58-13.581L29.2,92.573a1.079,1.079,0,0,0,1.525-1.525Z" transform="translate(0 -74.556)" fill="#ea2864"/>
<path id="Path_5101" data-name="Path 5101" d="M375.793,7.669,368.441.316a1.079,1.079,0,1,0-1.526,1.525l2.914,2.914L365.58,9l1.525,1.525,4.249-4.249,2.914,2.914a1.079,1.079,0,0,0,1.526-1.526Z" transform="translate(-339.292 0)" fill="#ea2864"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 985 B

@ -0,0 +1,8 @@
<svg xmlns="http://www.w3.org/2000/svg" width="58" height="36.818" viewBox="0 0 58 36.818">
<g id="heart-rate" transform="translate(-6.46 -15.787)">
<path id="Path_5093" data-name="Path 5093" d="M45.091,35.4,39.9,28.233l-5.416,6.781a2.626,2.626,0,0,1-3.743.364l-4.858-4.1L23.814,35.64a4.3,4.3,0,0,1-3.869,2.446H19.16l12.88,12.88L46.422,36.584A4.254,4.254,0,0,1,45.091,35.4Z" transform="translate(1.694 1.639)" fill="#d02127"/>
<path id="Path_5094" data-name="Path 5094" d="M23.617,31.245A3.427,3.427,0,0,1,28.93,30.1l4.255,3.6,4.927-6.167a3.427,3.427,0,0,1,5.462.125l5.518,7.623h1.183a11.817,11.817,0,0,0-17.352-16.02A11.819,11.819,0,0,0,16.21,35.966l.228.228h4.824Z" transform="translate(0.866 0)" fill="#d02127"/>
<path id="Path_5095" data-name="Path 5095" d="M8.258,33.723a1.8,1.8,0,0,0,0,3.607H20.91L17.3,33.723Z" transform="translate(0 2.425)" fill="#d02127"/>
<path id="Path_5096" data-name="Path 5096" d="M57.729,32.913H46.09l-2.97,3.027a4.208,4.208,0,0,0,2.128.58H57.729a1.8,1.8,0,0,0,0-3.607Z" transform="translate(4.933 2.316)" fill="#d02127"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -20,7 +20,7 @@ class API {
static getCallRequestInfoByClinicInfo(String deviceIp,
{required Function(List<PatientTicketModel>, List<PatientTicketModel>, CallConfig callConfig) onSuccess, required Function(dynamic) onFailure}) async {
final body = {"ipAdress": deviceIp, "apiKey": apiKey};
bool isDevMode = false;
bool isDevMode = true;
if (isDevMode) {
var callPatients = PatientTicketModel.testCallPatients;
CallConfig callConfig = CallConfig.testCallConfig;

@ -10,18 +10,29 @@ const apiKey = 'EE17D21C7943485D9780223CCE55DCE5'; // UAT
// const BASE_URL = 'http://10.200.204.11:2222/Services/Nurses.svc/REST';
// const BASE_URL = 'https://hmgwebservices.com/';
/// Timer Info
const TIMER_MIN = 10;
class AppGlobal {
static var CONTEX;
static Color appRedColor = const Color(0xFFD02127);
static Color appGreenColor = const Color(0xFF359846);
// static Color appRedColor = const Color(0xFFD02127);
// static Color appGreenColor = const Color(0xFF359846);
static Color appTextColor = const Color(0xFF2B353E);
static Color scheduleTextColor = const Color(0xFF2E303A);
static Color inProgressColor = const Color(0xFFCC9B14);
static Color appGreyColor = const Color(0xFF575757);
static Color appLightGreyColor = const Color(0xFFE6E6E6);
//TextColors
static Color nebulizationColor = const Color(0xFF3C86D0);
static Color vitalSignColor = const Color(0xFFD02127);
static Color doctorColor = const Color(0xFF52964F);
// static Color procedureColor = const Color(0xFFC99609);
static Color vaccinationColor = const Color(0xFFC99609);
static Color procedureColor = const Color(0xFF460707);
//IconPaths
static String vitalSignIcon = "assets/images/vitalsign_icon.svg";
static String nebulizationIcon = "assets/images/nebulization_icon.svg";
static String doctorIcon = "assets/images/doctor_icon.svg";
static String procedureIcon = "assets/images/procedure_icon.svg";
static String vaccinationIcon = "assets/images/vaccination_icon.svg";
}

@ -68,7 +68,7 @@ class CallConfig {
this.roomText = "",
this.queueNoText = "",
this.callForText = "",
this.currentServeText = "",
this.currentServeText = "Current Serving",
this.callTypeVitalSignText = "",
this.callTypeDoctorText = "",
this.callTypeProcedureText = "",
@ -108,8 +108,8 @@ class CallConfig {
callTypeProcedureText = json['callTypeProcedureText'];
callTypeVaccinationText = json['callTypeVaccinationText'];
callTypeNebulizationText = json['callTypeNebulizationText'];
// textDirection = json['textDirection'] == 2 ? TextDirection.rtl : TextDirection.ltr;
textDirection = TextDirection.ltr;
textDirection = json['textDirection'] == 2 ? TextDirection.rtl : TextDirection.ltr;
// textDirection = TextDirection.ltr;
}
static var data = {
@ -123,7 +123,7 @@ class CallConfig {
"screenLanguageText": "English",
"voiceLanguage": 1,
"voiceLanguageText": "English",
"screenMaxDisplayPatients": 3,
"screenMaxDisplayPatients": 6,
"isNotiReq": true,
"prioritySMS": 2,
"priorityWhatsApp": 3,

@ -1,6 +1,8 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
import 'package:queuing_system/core/config/config.dart';
import 'package:queuing_system/home/app_provider.dart';
import 'package:queuing_system/utils/utils.dart';
import 'package:queuing_system/widget/data_display/app_texts_widget.dart';
@ -9,12 +11,13 @@ class AppHeader extends StatelessWidget with PreferredSizeWidget {
@override
Widget build(BuildContext context) {
AppProvider appProvider = context.read<AppProvider>();
return Container(
padding: const EdgeInsets.only(
left: 0,
right: 5,
),
decoration: BoxDecoration(color: AppGlobal.appRedColor, border: const Border(bottom: BorderSide(color: Color(0xFFEFEFEF)))),
decoration: BoxDecoration(color: AppGlobal.vitalSignColor, border: const Border(bottom: BorderSide(color: Color(0xFFEFEFEF)))),
child: Container(
height: 100,
padding: const EdgeInsets.only(
@ -22,23 +25,26 @@ class AppHeader extends StatelessWidget with PreferredSizeWidget {
right: 20,
bottom: 0,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
InkWell(
onTap: () {},
child: const AppText(
" Current Serving",
color: Colors.white,
fontFamily: 'Poppins-SemiBold.ttf',
child: Directionality(
textDirection: appProvider.patientCallConfigurations.textDirection,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
InkWell(
onTap: () {},
child: AppText(
appProvider.patientCallConfigurations.currentServeText,
color: Colors.white,
fontFamily: 'Poppins-SemiBold.ttf',
),
),
),
SvgPicture.asset(
"assets/images/hmglogo.svg",
height: Utils.getHeight() * 0.5,
),
],
SvgPicture.asset(
"assets/images/hmglogo.svg",
height: Utils.getHeight() * 0.5,
),
],
),
),
),
);

@ -82,7 +82,7 @@ class AppProvider extends ChangeNotifier {
notifyListeners();
if (patientTickets.isNotEmpty) {
voiceCallPatientTicket(patientTickets.first);
updatePatientTicketByIndex(patientTickets.first);
updatePatientTicket(patientTickets.first);
}
}, onFailure: (error) {
log("Api call failed with this error: ${error.toString()}");
@ -122,8 +122,10 @@ class AppProvider extends ChangeNotifier {
}
CallByVoice? voiceCaller;
PatientTicketModel currentPatient = PatientTicketModel();
voiceCallPatientTicket(PatientTicketModel patientTicket) async {
currentPatient = patientTicket;
isCallingInProgress = true;
log("Setting isCallingInProgress : $isCallingInProgress");
@ -156,9 +158,41 @@ class AppProvider extends ChangeNotifier {
}
Future<void> listenAudioPlayerEvents() async {
audioPlayer.playerStateStream.listen((playerState) {
audioPlayer.playerStateStream.listen((playerState) async {
if (playerState.processingState == ProcessingState.completed) {
// isCallingInProgress = false;
if (currentPatient.isVoiceReq) return;
if (isQueuePatients.isNotEmpty) {
log("isQueuePatients length : ${isQueuePatients.length}");
final length = isQueuePatients.length;
for (int i = 0; i < length; i++) {
await Future.delayed(Duration(seconds: patientCallConfigurations.concurrentCallDelaySec)).whenComplete(() async {
PatientTicketModel temp = PatientTicketModel();
if (patientTickets.isNotEmpty) {
temp = patientTickets.elementAt(0);
patientTickets.removeAt(0);
}
notifyListeners();
isQueuePatients.removeAt(0);
patientTickets.add(temp);
notifyListeners();
await voiceCallPatientTicket(patientTickets.first);
updatePatientTicket(patientTickets.first);
});
}
}
isCallingInProgress = false;
log("Setting isCallingInProgress : $isCallingInProgress");
if (isApiCallNeeded) {
log("I will start waiting!!");
Timer(Duration(seconds: patientCallConfigurations.concurrentCallDelaySec), () async {
await callPatientsAPI();
log("Called the API after waiting!");
isApiCallNeeded = false;
});
}
}
});
@ -182,6 +216,7 @@ class AppProvider extends ChangeNotifier {
patientTickets.add(temp);
notifyListeners();
await voiceCallPatientTicket(patientTickets.first);
updatePatientTicket(patientTickets.first);
});
}
}
@ -209,8 +244,7 @@ class AppProvider extends ChangeNotifier {
// }
// }
updatePatientTicketByIndex(PatientTicketModel patientTicket) {
return;
updatePatientTicket(PatientTicketModel patientTicket) {
if (!patientTicket.isQueue) {
API.callUpdateNotIsQueueRecordByIDAsync(currentDeviceIp, ticket: patientTicket, onSuccess: (ticketsUpdated) {
log("[${patientTicket.callNoStr}] Ticket Updated: $ticketsUpdated");

@ -16,7 +16,6 @@ class PriorityTickets extends StatelessWidget {
Widget build(BuildContext context) {
final firstTicket = tickets[0];
final otherTickets = tickets.sublist(1, tickets.length);
return Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
@ -86,7 +85,6 @@ class TicketItem extends StatelessWidget {
@override
Widget build(BuildContext context) {
callConfig.textDirection = TextDirection.rtl;
return Transform.scale(
scale: scale,
child: Column(
@ -95,7 +93,7 @@ class TicketItem extends StatelessWidget {
BlinkText(getFormattedTicket(ticketNo, isClinicAdded),
style: TextStyle(
fontSize: SizeConfig.getWidthMultiplier() * 10,
letterSpacing: -9.32,
letterSpacing: -1,
height: 0.5,
fontWeight: FontWeight.bold,
),
@ -119,7 +117,7 @@ class TicketItem extends StatelessWidget {
AppText(
callType.message(callConfig),
color: callType.color(),
letterSpacing: -1.5,
letterSpacing: -1,
fontSize: SizeConfig.getWidthMultiplier() * 3.8,
fontWeight: FontWeight.w600,
fontHeight: 1,
@ -136,7 +134,7 @@ class TicketItem extends StatelessWidget {
AppText(
callConfig.textDirection == TextDirection.ltr ? "${callConfig.roomText}: $roomNo" : " $roomNo : ${callConfig.roomText}",
color: callType.color(),
letterSpacing: -1.5,
letterSpacing: -1,
fontSize: SizeConfig.getWidthMultiplier() * 3.8,
fontWeight: FontWeight.w600,
fontHeight: 1,
@ -263,7 +261,7 @@ Widget priorityTicketsWithSideList({required List<PatientTicketModel> tickets, r
children: [
AppText(
itm.queueNo.toString(),
letterSpacing: -2,
letterSpacing: -1,
fontHeight: 0.5,
fontWeight: FontWeight.bold,
fontSize: SizeConfig.getWidthMultiplier() * 4,
@ -282,12 +280,12 @@ Widget priorityTicketsWithSideList({required List<PatientTicketModel> tickets, r
flex: 5,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Padding(
padding: const EdgeInsets.only(top: 10),
padding: const EdgeInsets.only(bottom: 10),
child: SizedBox(
width: SizeConfig.getWidthMultiplier() * 3,
width: SizeConfig.getWidthMultiplier() * 3.5,
child: itm.getCallType().icon(SizeConfig.getHeightMultiplier() * 2.5),
),
),
@ -295,7 +293,7 @@ Widget priorityTicketsWithSideList({required List<PatientTicketModel> tickets, r
AppText(
itm.getCallType().message(callConfig, isListView: true),
color: itm.getCallType().color(),
letterSpacing: -1.5,
letterSpacing: -1,
fontSize: SizeConfig.getWidthMultiplier() * 3,
fontWeight: FontWeight.w600,
fontHeight: 0.5,

@ -8,15 +8,15 @@ enum CallType { vitalSign, doctor, procedure, vaccination, nebulization, none }
extension XCallType on CallType {
Color color() {
if (this == CallType.vitalSign) {
return AppGlobal.appGreenColor;
return AppGlobal.vitalSignColor;
} else if (this == CallType.doctor) {
return AppGlobal.appRedColor;
return AppGlobal.doctorColor;
} else if (this == CallType.procedure) {
return AppGlobal.appGreenColor;
return AppGlobal.procedureColor;
} else if (this == CallType.vaccination) {
return AppGlobal.appGreenColor;
return AppGlobal.vaccinationColor;
} else if (this == CallType.nebulization) {
return AppGlobal.appGreenColor;
return AppGlobal.nebulizationColor;
} else {
return Colors.black54;
}
@ -44,15 +44,15 @@ extension XCallType on CallType {
SvgPicture icon(double height) {
if (this == CallType.vitalSign) {
return SvgPicture.asset("assets/images/nurseicon.svg", height: height, color: color());
return SvgPicture.asset(AppGlobal.vitalSignIcon, height: height, color: color());
} else if (this == CallType.doctor) {
return SvgPicture.asset("assets/images/doctoricon.svg", height: height, color: color());
return SvgPicture.asset(AppGlobal.doctorIcon, height: height, color: color());
} else if (this == CallType.procedure) {
return SvgPicture.asset("assets/images/doctoricon.svg", height: height, color: color());
return SvgPicture.asset(AppGlobal.procedureIcon, height: height, color: color());
} else if (this == CallType.vaccination) {
return SvgPicture.asset("assets/images/doctoricon.svg", height: height, color: color());
return SvgPicture.asset(AppGlobal.vaccinationIcon, height: height, color: color());
} else if (this == CallType.nebulization) {
return SvgPicture.asset("assets/images/nurseicon.svg", height: height, color: color());
return SvgPicture.asset(AppGlobal.nebulizationIcon, height: height, color: color());
}
return SvgPicture.asset("assets/images/wait.svg", height: height, color: color());
}

Loading…
Cancel
Save