|
|
|
|
@ -22,7 +22,8 @@ class MainQueueScreen extends StatelessWidget {
|
|
|
|
|
return const SizedBox.shrink();
|
|
|
|
|
}
|
|
|
|
|
return Container(
|
|
|
|
|
height: (screenConfigViewModel.globalConfigurationsModel.orientationTypeEnum == ScreenOrientationEnum.portraitUp || screenConfigViewModel.globalConfigurationsModel.orientationTypeEnum == ScreenOrientationEnum.portraitDown)
|
|
|
|
|
height: (screenConfigViewModel.globalConfigurationsModel.orientationTypeEnum == ScreenOrientationEnum.portraitUp ||
|
|
|
|
|
screenConfigViewModel.globalConfigurationsModel.orientationTypeEnum == ScreenOrientationEnum.portraitDown)
|
|
|
|
|
? SizeConfig.getHeightMultiplier() * 2
|
|
|
|
|
: SizeConfig.getHeightMultiplier() * 0.9,
|
|
|
|
|
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 10),
|
|
|
|
|
@ -41,11 +42,13 @@ class MainQueueScreen extends StatelessWidget {
|
|
|
|
|
screenConfigViewModel.globalConfigurationsModel.weatherText,
|
|
|
|
|
color: Colors.grey,
|
|
|
|
|
fontSize: SizeConfig.getWidthMultiplier() * 2,
|
|
|
|
|
fontFamily: screenConfigViewModel.globalConfigurationsModel.screenLanguageEnum == LanguageEnum.arabic ? AppStrings.fontNameCairo : AppStrings.fontNamePoppins,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
"${screenConfigViewModel.globalConfigurationsModel.maxText}: ${screenConfigViewModel.weathersWidgetModel.maxTemp}°C , ${screenConfigViewModel.globalConfigurationsModel.minText}: ${screenConfigViewModel.weathersWidgetModel.minTemp}°C",
|
|
|
|
|
fontSize: SizeConfig.getWidthMultiplier() * 3,
|
|
|
|
|
fontHeight: 1,
|
|
|
|
|
fontFamily: screenConfigViewModel.globalConfigurationsModel.screenLanguageEnum == LanguageEnum.arabic ? AppStrings.fontNameCairo : AppStrings.fontNamePoppins,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
@ -66,7 +69,8 @@ class MainQueueScreen extends StatelessWidget {
|
|
|
|
|
}
|
|
|
|
|
return SizedBox(
|
|
|
|
|
child: Container(
|
|
|
|
|
height: (screenConfigViewModel.globalConfigurationsModel.orientationTypeEnum == ScreenOrientationEnum.portraitUp || screenConfigViewModel.globalConfigurationsModel.orientationTypeEnum == ScreenOrientationEnum.portraitDown)
|
|
|
|
|
height: (screenConfigViewModel.globalConfigurationsModel.orientationTypeEnum == ScreenOrientationEnum.portraitUp ||
|
|
|
|
|
screenConfigViewModel.globalConfigurationsModel.orientationTypeEnum == ScreenOrientationEnum.portraitDown)
|
|
|
|
|
? SizeConfig.getHeightMultiplier() * 2
|
|
|
|
|
: SizeConfig.getHeightMultiplier() * 0.9,
|
|
|
|
|
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 10),
|
|
|
|
|
@ -85,11 +89,13 @@ class MainQueueScreen extends StatelessWidget {
|
|
|
|
|
screenConfigViewModel.globalConfigurationsModel.nextPrayerText,
|
|
|
|
|
color: Colors.grey,
|
|
|
|
|
fontSize: SizeConfig.getWidthMultiplier() * 1.5,
|
|
|
|
|
fontFamily: screenConfigViewModel.globalConfigurationsModel.screenLanguageEnum == LanguageEnum.arabic ? AppStrings.fontNameCairo : AppStrings.fontNamePoppins,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
screenConfigViewModel.nextPrayerToShowWithTime,
|
|
|
|
|
fontSize: SizeConfig.getWidthMultiplier() * 3,
|
|
|
|
|
fontHeight: 1,
|
|
|
|
|
fontFamily: screenConfigViewModel.globalConfigurationsModel.screenLanguageEnum == LanguageEnum.arabic ? AppStrings.fontNameCairo : AppStrings.fontNamePoppins,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
@ -105,10 +111,11 @@ class MainQueueScreen extends StatelessWidget {
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Widget noPatientInQueue(String text) {
|
|
|
|
|
Widget noPatientInQueue({required String text, required String fontName}) {
|
|
|
|
|
return Center(
|
|
|
|
|
child: AppText(
|
|
|
|
|
text,
|
|
|
|
|
fontFamily: fontName,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
fontSize: SizeConfig.getWidthMultiplier() * 9,
|
|
|
|
|
),
|
|
|
|
|
@ -132,12 +139,14 @@ class MainQueueScreen extends StatelessWidget {
|
|
|
|
|
builder: (BuildContext context, ScreenConfigViewModel screenConfigViewModel, QueuingViewModel queuingViewModel, Widget? child) {
|
|
|
|
|
Widget widget = const SizedBox();
|
|
|
|
|
String text = AppStrings.awaitingArrivalEng;
|
|
|
|
|
String fontFamily = AppStrings.fontNamePoppins;
|
|
|
|
|
// queuingViewModel.voiceCallTicket(ticketData: queuingViewModel.currentTickets.first.ticketModel);
|
|
|
|
|
if (screenConfigViewModel.globalConfigurationsModel.screenLanguageEnum == LanguageEnum.arabic) {
|
|
|
|
|
text = AppStrings.awaitingArrivalAr;
|
|
|
|
|
fontFamily = AppStrings.fontNameCairo;
|
|
|
|
|
}
|
|
|
|
|
if (queuingViewModel.currentTickets.isEmpty) {
|
|
|
|
|
widget = noPatientInQueue(text);
|
|
|
|
|
widget = noPatientInQueue(text: text, fontName: fontFamily);
|
|
|
|
|
} else if (screenConfigViewModel.globalConfigurationsModel.screenTypeEnum == ScreenTypeEnum.roomLevelScreen) {
|
|
|
|
|
widget = PriorityTickets(
|
|
|
|
|
tickets: [queuingViewModel.currentTickets.first],
|
|
|
|
|
@ -165,13 +174,15 @@ class MainQueueScreen extends StatelessWidget {
|
|
|
|
|
int flex = 1;
|
|
|
|
|
|
|
|
|
|
if (screenConfigVM.currentScreenTypeEnum == ScreenTypeEnum.roomLevelScreen) {
|
|
|
|
|
if (screenConfigVM.globalConfigurationsModel.orientationTypeEnum == ScreenOrientationEnum.portraitUp || screenConfigVM.globalConfigurationsModel.orientationTypeEnum == ScreenOrientationEnum.portraitDown) {
|
|
|
|
|
if (screenConfigVM.globalConfigurationsModel.orientationTypeEnum == ScreenOrientationEnum.portraitUp ||
|
|
|
|
|
screenConfigVM.globalConfigurationsModel.orientationTypeEnum == ScreenOrientationEnum.portraitDown) {
|
|
|
|
|
flex = 2;
|
|
|
|
|
} else {
|
|
|
|
|
flex = 3;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if (screenConfigVM.globalConfigurationsModel.orientationTypeEnum == ScreenOrientationEnum.portraitUp || screenConfigVM.globalConfigurationsModel.orientationTypeEnum == ScreenOrientationEnum.portraitDown) {
|
|
|
|
|
if (screenConfigVM.globalConfigurationsModel.orientationTypeEnum == ScreenOrientationEnum.portraitUp ||
|
|
|
|
|
screenConfigVM.globalConfigurationsModel.orientationTypeEnum == ScreenOrientationEnum.portraitDown) {
|
|
|
|
|
flex = 2;
|
|
|
|
|
} else {
|
|
|
|
|
flex = 1;
|
|
|
|
|
@ -219,6 +230,8 @@ class MainQueueScreen extends StatelessWidget {
|
|
|
|
|
selector: (context, screenConfigViewModel) => screenConfigViewModel.globalConfigurationsModel.orientationTypeEnum,
|
|
|
|
|
builder: (BuildContext context, ScreenOrientationEnum screenOrientationEnum, Widget? child) {
|
|
|
|
|
//TODO: For Testing Only
|
|
|
|
|
// context.read<ScreenConfigViewModel>().createAutoTickets(numOfTicketsToCreate: 20);
|
|
|
|
|
//
|
|
|
|
|
// context.read<QueuingViewModel>().voiceCallTicket(ticketData: context.read<QueuingViewModel>().currentTickets.first.ticketModel);
|
|
|
|
|
return RotatedBox(
|
|
|
|
|
quarterTurns: screenOrientationEnum.getTurnsByOrientation(),
|
|
|
|
|
|