|
|
|
@ -1,10 +1,7 @@
|
|
|
|
import 'package:blinking_text/blinking_text.dart';
|
|
|
|
import 'package:blinking_text/blinking_text.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
|
|
|
|
|
|
import 'package:queuing_system/core/config/config.dart';
|
|
|
|
|
|
|
|
import 'package:queuing_system/core/config/size_config.dart';
|
|
|
|
import 'package:queuing_system/core/config/size_config.dart';
|
|
|
|
import 'package:queuing_system/core/response_model/patient_call.dart';
|
|
|
|
import 'package:queuing_system/core/response_model/patient_call.dart';
|
|
|
|
import 'package:queuing_system/home/que_item/que_item.dart';
|
|
|
|
|
|
|
|
import 'package:queuing_system/utils/call_type.dart';
|
|
|
|
import 'package:queuing_system/utils/call_type.dart';
|
|
|
|
import 'package:queuing_system/widget/data_display/app_texts_widget.dart';
|
|
|
|
import 'package:queuing_system/widget/data_display/app_texts_widget.dart';
|
|
|
|
|
|
|
|
|
|
|
|
@ -15,61 +12,67 @@ class PriorityTickets extends StatelessWidget {
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
|
|
|
|
|
|
|
final firstTicket = tickets[0];
|
|
|
|
final firstTicket = tickets[0];
|
|
|
|
final otherTickets = tickets.sublist(1,tickets.length);
|
|
|
|
final otherTickets = tickets.sublist(1, tickets.length);
|
|
|
|
|
|
|
|
|
|
|
|
return Column(
|
|
|
|
return Column(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
|
|
|
|
const SizedBox(height: 20),
|
|
|
|
vTicketItem(ticketNo: "${firstTicket.callNo ?? ''}", callType: firstTicket.getCallType(), scale: 1.2, blink: true),
|
|
|
|
vTicketItem(
|
|
|
|
|
|
|
|
ticketNo: firstTicket.callNoStr ?? '',
|
|
|
|
const SizedBox(height: 100),
|
|
|
|
callType: firstTicket.getCallType(),
|
|
|
|
|
|
|
|
scale: 1,
|
|
|
|
if(tickets.length > 1)
|
|
|
|
blink: true,
|
|
|
|
...[
|
|
|
|
roomNo: firstTicket.roomNo,
|
|
|
|
SizedBox(height: SizeConfig.getHeightMultiplier()*1.5),
|
|
|
|
),
|
|
|
|
Row(
|
|
|
|
const SizedBox(height: 40),
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
|
|
|
if (tickets.length > 1) ...[
|
|
|
|
children: otherTickets.map((ticket) => vTicketItem(ticketNo: "${ticket.callNo ?? ''}", callType: ticket.getCallType(), scale: 0.8)).toList(),
|
|
|
|
SizedBox(height: SizeConfig.getHeightMultiplier() * 1.5),
|
|
|
|
)
|
|
|
|
Column(
|
|
|
|
]
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
|
|
|
|
|
|
|
children: otherTickets
|
|
|
|
|
|
|
|
.map((ticket) => Padding(
|
|
|
|
|
|
|
|
padding: EdgeInsets.only(top: SizeConfig.getHeightMultiplier() * 2),
|
|
|
|
|
|
|
|
child: vTicketItem(
|
|
|
|
|
|
|
|
ticketNo: ticket.callNoStr ?? '',
|
|
|
|
|
|
|
|
callType: ticket.getCallType(),
|
|
|
|
|
|
|
|
scale: 0.7,
|
|
|
|
|
|
|
|
roomNo: ticket.roomNo,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
))
|
|
|
|
|
|
|
|
.toList(),
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
]
|
|
|
|
],
|
|
|
|
],
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class vTicketItem extends StatelessWidget{
|
|
|
|
class vTicketItem extends StatelessWidget {
|
|
|
|
final String ticketNo;
|
|
|
|
final String ticketNo;
|
|
|
|
|
|
|
|
final String roomNo;
|
|
|
|
final CallType callType;
|
|
|
|
final CallType callType;
|
|
|
|
final bool blink;
|
|
|
|
final bool blink;
|
|
|
|
final double scale;
|
|
|
|
final double scale;
|
|
|
|
vTicketItem({@required this.ticketNo, @required this.callType, this.scale, this.blink = false});
|
|
|
|
|
|
|
|
|
|
|
|
const vTicketItem({@required this.ticketNo, @required this.roomNo, @required this.callType, this.scale, this.blink = false});
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
|
|
|
|
|
|
|
return Transform.scale(
|
|
|
|
return Transform.scale(
|
|
|
|
scale: scale,
|
|
|
|
scale: scale,
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
BlinkText(
|
|
|
|
BlinkText(ticketNo,
|
|
|
|
ticketNo,
|
|
|
|
style: TextStyle(fontSize: SizeConfig.getWidthMultiplier() * 10, letterSpacing: -9.32, height: 0.5, fontWeight: FontWeight.bold),
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontSize: SizeConfig.getWidthMultiplier() * 16,
|
|
|
|
|
|
|
|
letterSpacing: -9.32,
|
|
|
|
|
|
|
|
height: 0.5,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.bold
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
beginColor: Colors.black,
|
|
|
|
beginColor: Colors.black,
|
|
|
|
endColor: blink ? Colors.black.withOpacity(0.1) : Colors.black,
|
|
|
|
endColor: blink ? Colors.black.withOpacity(0.1) : Colors.black,
|
|
|
|
// endColor: blink ? AppGlobal.appRedColor : Colors.black,
|
|
|
|
// endColor: blink ? AppGlobal.appRedColor : Colors.black,
|
|
|
|
times: 0,
|
|
|
|
times: 0,
|
|
|
|
duration: const Duration(seconds: 1)
|
|
|
|
duration: const Duration(seconds: 1)),
|
|
|
|
),
|
|
|
|
|
|
|
|
// AppText(
|
|
|
|
// AppText(
|
|
|
|
// ticketNo,
|
|
|
|
// ticketNo,
|
|
|
|
// letterSpacing: -9.32,
|
|
|
|
// letterSpacing: -9.32,
|
|
|
|
@ -77,18 +80,32 @@ class vTicketItem extends StatelessWidget{
|
|
|
|
// fontWeight: FontWeight.bold,
|
|
|
|
// fontWeight: FontWeight.bold,
|
|
|
|
// fontHeight: 0.7,
|
|
|
|
// fontHeight: 0.7,
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
|
|
|
|
const SizedBox(height: 10),
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
callType.icon(SizeConfig.getHeightMultiplier()*2.5),
|
|
|
|
callType.icon(SizeConfig.getHeightMultiplier() * 3),
|
|
|
|
const SizedBox(width: 10),
|
|
|
|
const SizedBox(width: 10),
|
|
|
|
AppText(
|
|
|
|
AppText(
|
|
|
|
callType.message('en'),
|
|
|
|
callType.message('en'),
|
|
|
|
color: callType.color(),
|
|
|
|
color: callType.color(),
|
|
|
|
letterSpacing: -1.5,
|
|
|
|
letterSpacing: -1.5,
|
|
|
|
fontSize: SizeConfig.getWidthMultiplier() * 3.3,
|
|
|
|
fontSize: SizeConfig.getWidthMultiplier() * 3.8,
|
|
|
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
|
|
|
fontHeight: 0.5,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Container(
|
|
|
|
|
|
|
|
color: Colors.grey.withOpacity(0.3),
|
|
|
|
|
|
|
|
width: 6,
|
|
|
|
|
|
|
|
height: SizeConfig.getHeightMultiplier() * 3,
|
|
|
|
|
|
|
|
margin: const EdgeInsets.symmetric(horizontal: 10),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
AppText(
|
|
|
|
|
|
|
|
"Room: $roomNo",
|
|
|
|
|
|
|
|
color: callType.color(),
|
|
|
|
|
|
|
|
letterSpacing: -1.5,
|
|
|
|
|
|
|
|
fontSize: SizeConfig.getWidthMultiplier() * 3.8,
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
fontHeight: 0.5,
|
|
|
|
fontHeight: 0.5,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|