0

I'm new to flutter and stuck at a point where I can't think of solving this issue.I'm using this plugin syncfusion_flutter_calendar to display a calendar where people can view their scheduled jobs.I need to display the scheduled days data to this calendar.which means only the to highlight the days which are scheduled.If I have a data model like below.How can I create the data source for it.

Example :

Class ScheduledJobs {

int? id;
String? jobTitle;
DateTime? scheduledDate;

ScheduledJobs(this.id,this.jobTitle,this.scheduledDate);

}

Hope you guys can help me! thank you..

This is what the body look like.And I need to map the data from above class model to display them.

body: Padding(
        padding: const EdgeInsets.only(left: 15, right: 15),
        child: Container(
          child: SfCalendar(
            showDatePickerButton: true,
            allowedViews: const <CalendarView>[
              CalendarView.day,
              CalendarView.week,
              CalendarView.month,
              CalendarView.schedule
            ],
            view: CalendarView.schedule,
            scheduleViewSettings: ScheduleViewSettings(
              hideEmptyScheduleWeek: false,
            ),
            dataSource: _calendarDataSource,
            loadMoreWidgetBuilder:
                (BuildContext context, LoadMoreCallback loadMoreAppointments) {
              return FutureBuilder(
                future: loadMoreAppointments(),
                builder: (context, snapShot) {
                  return Container(
                    alignment: Alignment.center,
                    child: const CircularProgressIndicator(
                      valueColor: AlwaysStoppedAnimation(Colors.blue),
                    ),
                  );
                },
              );
            },
          ),
        ),
      ),
Harsh Sureja
  • 1,052
  • 1
  • 9
  • 22
Hankoo
  • 1
  • 2
  • Be aware that the SyncFusion products in the Dart/Flutter pub are *not* open source. They are released under a commercial license that may subject you or your organization to a financial liability, and might affect downstream re-users of your code. – Randal Schwartz Mar 21 '23 at 06:55

0 Answers0