|
|
|
|
@ -1,8 +1,12 @@
|
|
|
|
|
import 'dart:developer';
|
|
|
|
|
|
|
|
|
|
import 'package:blinking_text/blinking_text.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
import 'package:queuing_system/core/config/size_config.dart';
|
|
|
|
|
import 'package:queuing_system/core/response_models/call_config_model.dart';
|
|
|
|
|
import 'package:queuing_system/core/response_models/patient_ticket_model.dart';
|
|
|
|
|
import 'package:queuing_system/home/app_provider.dart';
|
|
|
|
|
import 'package:queuing_system/utils/call_type.dart';
|
|
|
|
|
import 'package:queuing_system/widget/data_display/app_texts_widget.dart';
|
|
|
|
|
|
|
|
|
|
@ -148,12 +152,18 @@ class TicketItem extends StatelessWidget {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Widget noPatientInQueue() {
|
|
|
|
|
Widget noPatientInQueue({required ScreenOrientationEnum screenOrientationEnum}) {
|
|
|
|
|
return Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
Center(
|
|
|
|
|
child: AppText("Awaiting Patients Arrival", fontFamily: 'Poppins-SemiBold.ttf', fontSize: SizeConfig.getWidthMultiplier() * 9),
|
|
|
|
|
child: AppText(
|
|
|
|
|
"Awaiting Patients Arrival",
|
|
|
|
|
fontFamily: 'Poppins-SemiBold.ttf',
|
|
|
|
|
fontSize: (screenOrientationEnum == ScreenOrientationEnum.portraitDown || screenOrientationEnum == ScreenOrientationEnum.portraitUp)
|
|
|
|
|
? SizeConfig.getWidthMultiplier() * 9
|
|
|
|
|
: SizeConfig.getWidthMultiplier() * 7,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
@ -171,179 +181,183 @@ Widget qamarsBirthdayWidget() {
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Widget priorityTicketsWithSideList({required List<PatientTicketModel> tickets, required CallConfig callConfig}) {
|
|
|
|
|
Widget priorityTicketsWithSideList({required List<PatientTicketModel> tickets, required CallConfig callConfig, required BuildContext context}) {
|
|
|
|
|
final priorityTickets = tickets.sublist(0, 3);
|
|
|
|
|
final otherTickets = tickets.sublist(3, tickets.length);
|
|
|
|
|
return Row(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(flex: 7, child: PriorityTickets(callConfig: callConfig, tickets: priorityTickets)),
|
|
|
|
|
Container(color: Colors.grey.withOpacity(0.1), width: 10, margin: const EdgeInsets.symmetric(horizontal: 10, vertical: 50)),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 6,
|
|
|
|
|
child: ListView(
|
|
|
|
|
children: [
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.fromLTRB(10, SizeConfig.getHeightMultiplier() * 3.3, 10, 10),
|
|
|
|
|
child: Directionality(
|
|
|
|
|
textDirection: callConfig.textDirection,
|
|
|
|
|
child: Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 3,
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
callConfig.queueNoText,
|
|
|
|
|
letterSpacing: -2,
|
|
|
|
|
fontHeight: 0.5,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
fontSize: SizeConfig.getWidthMultiplier() * 3.8,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
color: Colors.grey.withOpacity(0.5),
|
|
|
|
|
width: 5,
|
|
|
|
|
height: SizeConfig.getHeightMultiplier() * 2,
|
|
|
|
|
margin: const EdgeInsets.symmetric(horizontal: 15),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 5,
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
callConfig.callForText,
|
|
|
|
|
letterSpacing: -2,
|
|
|
|
|
fontHeight: 0.5,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
fontSize: SizeConfig.getWidthMultiplier() * 3.8,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
color: Colors.grey.withOpacity(0.5),
|
|
|
|
|
width: 5,
|
|
|
|
|
height: SizeConfig.getHeightMultiplier() * 2,
|
|
|
|
|
margin: const EdgeInsets.symmetric(horizontal: 15),
|
|
|
|
|
final AppProvider appProvider = context.watch<AppProvider>();
|
|
|
|
|
log("appProvider.currentScreenRotation: ${appProvider.currentScreenRotation}");
|
|
|
|
|
|
|
|
|
|
final List<Widget> children = [
|
|
|
|
|
Expanded(flex: 7, child: PriorityTickets(callConfig: callConfig, tickets: priorityTickets)),
|
|
|
|
|
Container(color: Colors.grey.withOpacity(0.1), width: 10, margin: const EdgeInsets.symmetric(horizontal: 10, vertical: 50)),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 6,
|
|
|
|
|
child: ListView(
|
|
|
|
|
children: [
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.fromLTRB(10, SizeConfig.getHeightMultiplier() * 3.3, 10, 10),
|
|
|
|
|
child: Directionality(
|
|
|
|
|
textDirection: callConfig.textDirection,
|
|
|
|
|
child: Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 3,
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
callConfig.queueNoText,
|
|
|
|
|
letterSpacing: -2,
|
|
|
|
|
fontHeight: 0.5,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
fontSize: SizeConfig.getWidthMultiplier() * 3.8,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 3,
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
callConfig.roomText,
|
|
|
|
|
letterSpacing: -2,
|
|
|
|
|
fontHeight: 0.5,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
fontSize: SizeConfig.getWidthMultiplier() * 3.8,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
color: Colors.grey.withOpacity(0.5),
|
|
|
|
|
width: 5,
|
|
|
|
|
height: SizeConfig.getHeightMultiplier() * 2,
|
|
|
|
|
margin: const EdgeInsets.symmetric(horizontal: 15),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 5,
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
callConfig.callForText,
|
|
|
|
|
letterSpacing: -2,
|
|
|
|
|
fontHeight: 0.5,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
fontSize: SizeConfig.getWidthMultiplier() * 3.8,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
ListView.builder(
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
itemCount: otherTickets.length,
|
|
|
|
|
itemBuilder: (ctx, idx) {
|
|
|
|
|
final itm = otherTickets[idx];
|
|
|
|
|
return Padding(
|
|
|
|
|
padding: const EdgeInsets.all(8),
|
|
|
|
|
child: Directionality(
|
|
|
|
|
textDirection: callConfig.textDirection,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
color: Colors.grey.withOpacity(0.5),
|
|
|
|
|
width: 5,
|
|
|
|
|
height: SizeConfig.getHeightMultiplier() * 2,
|
|
|
|
|
margin: const EdgeInsets.symmetric(horizontal: 15),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 3,
|
|
|
|
|
child: Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 3,
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
itm.queueNo.toString(),
|
|
|
|
|
letterSpacing: -1,
|
|
|
|
|
fontHeight: 0.5,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
fontSize: SizeConfig.getWidthMultiplier() * 4,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
callConfig.roomText,
|
|
|
|
|
letterSpacing: -2,
|
|
|
|
|
fontHeight: 0.5,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
fontSize: SizeConfig.getWidthMultiplier() * 3.8,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
color: Colors.grey.withOpacity(0.5),
|
|
|
|
|
width: 5,
|
|
|
|
|
height: SizeConfig.getHeightMultiplier() * 2,
|
|
|
|
|
margin: const EdgeInsets.symmetric(horizontal: 15),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
ListView.builder(
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
itemCount: otherTickets.length,
|
|
|
|
|
itemBuilder: (ctx, idx) {
|
|
|
|
|
final itm = otherTickets[idx];
|
|
|
|
|
return Padding(
|
|
|
|
|
padding: const EdgeInsets.all(8),
|
|
|
|
|
child: Directionality(
|
|
|
|
|
textDirection: callConfig.textDirection,
|
|
|
|
|
child: Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 3,
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
itm.queueNo.toString(),
|
|
|
|
|
letterSpacing: -1,
|
|
|
|
|
fontHeight: 0.5,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
fontSize: SizeConfig.getWidthMultiplier() * 4,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 5,
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.only(bottom: 10),
|
|
|
|
|
child: SizedBox(
|
|
|
|
|
width: SizeConfig.getWidthMultiplier() * 3.5,
|
|
|
|
|
child: itm.getCallType().icon(SizeConfig.getHeightMultiplier() * 2.5),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(width: 15),
|
|
|
|
|
AppText(
|
|
|
|
|
itm.getCallType().message(callConfig, isListView: true),
|
|
|
|
|
color: itm.getCallType().color(),
|
|
|
|
|
letterSpacing: -1,
|
|
|
|
|
fontSize: SizeConfig.getWidthMultiplier() * 3,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontHeight: 0.5,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
color: Colors.grey.withOpacity(0.5),
|
|
|
|
|
width: 5,
|
|
|
|
|
height: SizeConfig.getHeightMultiplier() * 2,
|
|
|
|
|
margin: const EdgeInsets.symmetric(horizontal: 15),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 5,
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.only(bottom: 10),
|
|
|
|
|
child: SizedBox(
|
|
|
|
|
width: SizeConfig.getWidthMultiplier() * 3.5,
|
|
|
|
|
child: itm.getCallType().icon(SizeConfig.getHeightMultiplier() * 2.5),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(width: 15),
|
|
|
|
|
AppText(
|
|
|
|
|
itm.getCallType().message(callConfig, isListView: true),
|
|
|
|
|
color: itm.getCallType().color(),
|
|
|
|
|
letterSpacing: -1,
|
|
|
|
|
fontSize: SizeConfig.getWidthMultiplier() * 3,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontHeight: 0.5,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
color: Colors.grey.withOpacity(0.5),
|
|
|
|
|
width: 5,
|
|
|
|
|
height: SizeConfig.getHeightMultiplier() * 2,
|
|
|
|
|
margin: const EdgeInsets.symmetric(horizontal: 15),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
color: Colors.grey.withOpacity(0.5),
|
|
|
|
|
width: 5,
|
|
|
|
|
height: SizeConfig.getHeightMultiplier() * 2,
|
|
|
|
|
margin: const EdgeInsets.symmetric(horizontal: 15),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 3,
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
itm.roomNo, // callConfig.textDirection == TextDirection.ltr ? "${callConfig.roomText}: ${itm.roomNo}" : " ${itm.roomNo} ${callConfig.roomText}: ",
|
|
|
|
|
color: itm.getCallType().color(),
|
|
|
|
|
letterSpacing: -1.5,
|
|
|
|
|
fontSize: SizeConfig.getWidthMultiplier() * 3.3,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontHeight: 0.5,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 3,
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
itm.roomNo, // callConfig.textDirection == TextDirection.ltr ? "${callConfig.roomText}: ${itm.roomNo}" : " ${itm.roomNo} ${callConfig.roomText}: ",
|
|
|
|
|
color: itm.getCallType().color(),
|
|
|
|
|
letterSpacing: -1.5,
|
|
|
|
|
fontSize: SizeConfig.getWidthMultiplier() * 3.3,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontHeight: 0.5,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
];
|
|
|
|
|
return (appProvider.currentScreenRotation == ScreenOrientationEnum.portraitUp || appProvider.currentScreenRotation == ScreenOrientationEnum.portraitDown)
|
|
|
|
|
? Row(children: children)
|
|
|
|
|
: Column(children: children);
|
|
|
|
|
}
|
|
|
|
|
|