We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

usee timeSlotViewSettings in schedule view

Hy, 

I am trying to use timeSlotViewSettings in schedule view.

it works with all other view, but not in schedule.

return MaterialApp(
debugShowCheckedModeBanner: false,
localizationsDelegates: const [
AppLocalizations.delegate,
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
],
supportedLocales: const [
Locale('en'), // English
Locale('fr'), // Français
],
locale: const Locale('fr'),
title: 'Calendrier',
home: Scaffold(
body: SfCalendar(
view: CalendarView.schedule,
allowedViews: const [
CalendarView.day,
CalendarView.week,
CalendarView.workWeek,
CalendarView.schedule,
CalendarView.timelineDay,
CalendarView.timelineWeek,
CalendarView.timelineWorkWeek
],
timeSlotViewSettings: const TimeSlotViewSettings(
timelineAppointmentHeight: 500,
timeRulerSize: 80,
timeFormat: ' hh',
timeTextStyle: TextStyle(
color: Colors.black, fontWeight: FontWeight.bold)),
dataSource: MeetingDataSource(_getDataSource()),
scheduleViewSettings: const ScheduleViewSettings(
dayHeaderSettings: DayHeaderSettings(
dayFormat: 'EE',
width: 70,
dateTextStyle: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w300,
color: Colors.red,
),
dayTextStyle: TextStyle(
fontSize: 10,
fontWeight: FontWeight.w300,
color: Colors.red,
)),
appointmentTextStyle: TextStyle(
fontSize: 15,
fontWeight: FontWeight.w500,
color: Colors.lime),
appointmentItemHeight: 70.0,
hideEmptyScheduleWeek: false,
),
scheduleViewMonthHeaderBuilder: (BuildContext buildContext, ScheduleViewMonthHeaderDetails details) {
String monthName = Jiffy(details.date).format('MMMM');
String moisName = LocalConvertMonth(monthName, buildContext);
return Stack(
children: [
Image(
image: ExactAssetImage('images/in_app/'+ monthName + '.png'),
fit: BoxFit.cover,
width: details.bounds.width,
height: details.bounds.height/1.5),
Positioned(
left: 30,
right: 0,
top: 10,
bottom: 0,
child: Text(moisName +' '+ details.date.year.toString(),
style: TextStyle(fontSize: 18, color: Colors.white, fontWeight: FontWeight.bold),
),
)
],
);
},
showDatePickerButton: true
),
),
);

1 Reply

MS Muniappan Subramanian Syncfusion Team February 14, 2023 10:23 AM UTC

Mike,


The TimeslotView Settings are only applicable for time slot views, such as the day, week, work week, and timeline views. It is not applicable to the schedule view.


Please refer to our user guide documentation for more information on the Schedule View in the Flutter Calendar.

https://help.syncfusion.com/flutter/calendar/schedule-view


Loader.
Live Chat Icon For mobile
Up arrow icon