Skip to content

Commit

Permalink
Update appointment_card.dart
Browse files Browse the repository at this point in the history
  • Loading branch information
7Eltantawy committed Feb 5, 2024
1 parent 146f83a commit 784dd02
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ class AppointmentCard extends StatelessWidget {
@override
Widget build(BuildContext context) {
final Slot meeting = calendarDetails.appointments.first as Slot;
final size =
Size(calendarDetails.bounds.width, calendarDetails.bounds.height);
final bool landscapeCard = size.aspectRatio > 1;
return ColoredBox(
color: meeting.background,
child: Center(
child: FittedBox(
child: Padding(
padding: const EdgeInsets.all(4.0),
child: RotatedBox(
quarterTurns:
calendarDetails.bounds.width > calendarDetails.bounds.height
? 3
: 4,
quarterTurns: landscapeCard ? 0 : 3,
child: Text(
meeting.title,
textAlign: TextAlign.center,
Expand Down

0 comments on commit 784dd02

Please sign in to comment.