|
|
|
|
import 'package:flutter/cupertino.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/widget/data_display/app_texts_widget.dart';
|
|
|
|
|
|
|
|
|
|
class QueItem extends StatelessWidget {
|
|
|
|
|
const QueItem({
|
|
|
|
|
Key key,
|
|
|
|
|
this.isFirstLine = false,
|
|
|
|
|
this.isSecondLine = false,
|
|
|
|
|
this.isInListLine = false,
|
|
|
|
|
this.queNo,
|
|
|
|
|
this.isNurseVisit = false,
|
|
|
|
|
this.idDoctorVisit = false, this.haveListOfPatient
|
|
|
|
|
}) : super(key: key);
|
|
|
|
|
final bool isFirstLine;
|
|
|
|
|
final bool isSecondLine;
|
|
|
|
|
final bool isInListLine;
|
|
|
|
|
final bool isNurseVisit;
|
|
|
|
|
final bool idDoctorVisit;
|
|
|
|
|
final String queNo;
|
|
|
|
|
final bool haveListOfPatient;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return haveListOfPatient?
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.all(30.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
AppText(
|
|
|
|
|
queNo,
|
|
|
|
|
fontSize: SizeConfig.getWidthMultiplier() *
|
|
|
|
|
(isFirstLine
|
|
|
|
|
? 13
|
|
|
|
|
: isSecondLine
|
|
|
|
|
? 8.5
|
|
|
|
|
: 5.5),
|
|
|
|
|
letterSpacing: -5.00,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
fontFamily: 'Poppins-Bold.ttf',
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
SvgPicture.asset(
|
|
|
|
|
isNurseVisit
|
|
|
|
|
? "assets/images/nurseicon.svg"
|
|
|
|
|
: "assets/images/doctoricon.svg", height:(isFirstLine
|
|
|
|
|
? 40
|
|
|
|
|
: isSecondLine
|
|
|
|
|
? 40
|
|
|
|
|
: 40) ,),
|
|
|
|
|
const SizedBox(width: 8,),
|
|
|
|
|
AppText(
|
|
|
|
|
isNurseVisit ? "Please visit Nurse" : "Please visit doctor",
|
|
|
|
|
color: isNurseVisit
|
|
|
|
|
? AppGlobal.appGreenColor
|
|
|
|
|
: AppGlobal.appRedColor,
|
|
|
|
|
fontSize: SizeConfig.getWidthMultiplier() * (isFirstLine
|
|
|
|
|
? 3.3
|
|
|
|
|
: isSecondLine
|
|
|
|
|
? 3.3
|
|
|
|
|
: 3.3),
|
|
|
|
|
letterSpacing: -2.6,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontFamily: 'Poppins-Bold.ttf',
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
:Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.only(right: 20.0, left: 20.0),
|
|
|
|
|
child: AppText(
|
|
|
|
|
queNo,
|
|
|
|
|
fontSize: SizeConfig.getWidthMultiplier() *
|
|
|
|
|
(isFirstLine
|
|
|
|
|
? 13
|
|
|
|
|
: isSecondLine
|
|
|
|
|
? 8.5
|
|
|
|
|
: 5.5),
|
|
|
|
|
letterSpacing: -2.6,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
SvgPicture.asset(
|
|
|
|
|
isNurseVisit
|
|
|
|
|
? "assets/images/nurseicon.svg"
|
|
|
|
|
: "assets/images/doctoricon.svg", height:(isFirstLine
|
|
|
|
|
? 40
|
|
|
|
|
: isSecondLine
|
|
|
|
|
? 40
|
|
|
|
|
: 40) ,),
|
|
|
|
|
const SizedBox(width: 8,),
|
|
|
|
|
AppText(
|
|
|
|
|
isNurseVisit ? " Please visit Nurse" : " Please visit doctor",
|
|
|
|
|
color: AppGlobal.appLightGreyColor,
|
|
|
|
|
fontSize: SizeConfig.getWidthMultiplier() * (isFirstLine
|
|
|
|
|
? 3.3
|
|
|
|
|
: isSecondLine
|
|
|
|
|
? 3.3
|
|
|
|
|
: 3.3),
|
|
|
|
|
letterSpacing: -1.6,
|
|
|
|
|
fontFamily: 'Poppins-Medium.ttf',
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|