Row(
children: [
AppButton(
onTap: () {
showInDialog(
context,
contentPadding: EdgeInsets.zero,
title: Stack(
children: [
Row(
mainAxisSize: MainAxisSize.min,
children: [
Container(
padding: EdgeInsets.all(8),
decoration: boxDecorationWithRoundedCorners(backgroundColor: appSecondaryColor),
child: Image.asset("images/icons/appointment.png", fit: BoxFit.cover, height: 22, width: 22, color: white),
),
// Lottie.asset('images/appointment_confirmation.json', height: 46, width: 46),
16.width,
//TODO Add Localization
Text('Appointment Summary', style: boldTextStyle(size: 18)).flexible(),
],
),
Positioned(
right: 0,
top: 0,
child: Container(
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 8),
decoration: boxDecorationWithRoundedCorners(
backgroundColor: Colors.green,
borderRadius: BorderRadius.circular(defaultRadius),
),
child: Text(
getStatus(widget.upcomingData!.status.validate())!.toUpperCase(),
style: boldTextStyle(size: 10, color: white),
),
),
)
],
),
builder: (p0) {
return AppointmentQuickView(
upcomingAppointment: widget.upcomingData!,
);
},
);
},
shapeBorder: RoundedRectangleBorder(
borderRadius: (isEncounterDashboard || isCheckIn)
? BorderRadius.only(
topLeft: Radius.circular(defaultRadius),
bottomLeft: Radius.circular(defaultRadius),
)
: BorderRadius.all(defaultRadius),
),
child: Text("View", style: boldTextStyle(color: white, size: 12)),
color: appPrimaryColor,
),
AppButton(
onTap: () {
if (isPatient()) {
PatientEncounterDashboardScreen(
id: widget.upcomingData!.encounter_id.validate().toInt(),
).launch(context, pageRouteAnimation: PageRouteAnimation.Slide);
} else {
EncounterDashboardScreen(
id: widget.upcomingData!.encounter_id.validate(),
).launch(context, pageRouteAnimation: PageRouteAnimation.Slide);
}
},
shapeBorder: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(0)),
),
child: Text("Encounter", style: boldTextStyle(color: white, size: 12)),
color: appStore.isDarkModeOn ? cardDarkColor : Colors.black,
).visible(isEncounterDashboard),
AppButton(
onTap: () {
changeAppointmentStatus;
},
shapeBorder: RoundedRectangleBorder(
(isCheckIn)
? borderRadius
: BorderRadius.only(
topLeft: Radius.circular(0),
bottomLeft: Radius.circular(0),
bottomRight: Radius.circular(defaultRadius),
topRight: Radius.circular(defaultRadius),
),
),
child: Text(translate('lblCheckIn'), style: boldTextStyle(color: white, size: 12)).visible(
widget.upcomingData!.status.toInt().getStatus() != CheckInStatus,
defaultWidget: Text(translate('lblCheckOut'), style: boldTextStyle(color: white, size: 12)),
),
color: appSecondaryColor,
).visible(isCheckIn)
],
).expand(),