Skip to content

How to give height for the date cell ? #825

Closed
@naveenbarath99

Description

@naveenbarath99

Hi i'm trying to give height for the date cell but its not taking the height, if it goes for the smaller screen means the height of the cell is decreasing so i need to give fixed height for the Date cell. I'll attach my code also

SfCalendar(
cellBorderColor: whiteColor,
view: CalendarView.month,
controller: controller,
showDatePickerButton: true,
showNavigationArrow: false,
onViewChanged: onViewChanged,
dataSource: calendarDataSource,
monthViewSettings:
MonthViewSettings(showAgenda: true, numberOfWeeksInView: monthOrWeek),
timeSlotViewSettings: const TimeSlotViewSettings(
minimumAppointmentDuration: Duration(minutes: 60)),
onTap: (CalendarTapDetails details) {
if (details.targetElement.name.toString() == 'appointment') {
Navigator.pushNamed(context, calendarEventDetailRoute);
}
},
appointmentBuilder:
(BuildContext context, CalendarAppointmentDetails details) {
return Row(
mainAxisSize: MainAxisSize.max,
children: [
Container(
height: double.infinity,
width: 2,
color: Colors.blue,
),
Container(
width: MediaQuery.of(context).size.width * 0.76,
decoration: BoxDecoration(
color: Colors.blue.withOpacity(0.4),
),
padding: const EdgeInsets.all(5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text(
"Event name",
style: TextStyle(
color: Colors.white,
),
),
Text(
Utils().getUSDate(details.date.toString()),
style: const TextStyle(
color: Colors.white,
),
),
],
),
),
],
);
},
)

2198bb8c-0093-4787-8560-7c23a2a6ed60

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions