calendar_flutter 1.1.5 copy "calendar_flutter: ^1.1.5" to clipboard
calendar_flutter: ^1.1.5 copied to clipboard

A custom calendar for flutter apps. It supports displaying events as a continuous UI.

flutter_calendar #

A new Flutter package project for displaying calendar and the events that are happening currently.

Getting Started #

Add the flutter_calendar dependency to your pubspec.yaml

Add it as a child to any Widget, send size to the widget, by default it occupies the screen width and height

Set the list of events by using static method setListAndUpdateMap present in CalendarEvent class in calender_event.dart file

To add the calendar widget you just need to add below line of code

CustomCalendar() as a child

Example:

Container(
  child:CustomCalendar(),
);

Then you will see the UI as below:

If you want to add the events, you need to first set the list of events then build the widget which has CustomCalendar as child(this can be found in example):

void setCalendarEvents(){
    List<CalendarEvent> eventsList = List<CalendarEvent>();

    CalendarEvent event = CalendarEvent();
    event.title = "Meeting";
    event.startTime = DateTime(2019,11,01);
    event.endTime = DateTime(2019,11,10);
    event.bgColor = Colors.redAccent;
    eventsList.add(event);

    event = CalendarEvent();
    event.title = "Meeting1";
    event.startTime = DateTime(2019,11,09);
    event.endTime = DateTime(2019,11,09);
    event.bgColor = Colors.redAccent;
    eventsList.add(event);

    event = CalendarEvent();
    event.title = "Meeting2";
    event.startTime = DateTime(2019,11,10);
    event.endTime = DateTime(2019,11,10);
    event.bgColor = Colors.redAccent;
    eventsList.add(event);

    event = CalendarEvent();
    event.title = "Meeting3";
    event.startTime = DateTime(2019,11,01);
    event.endTime = DateTime(2019,11,10);
    event.bgColor = Colors.redAccent;
    eventsList.add(event);

    event = CalendarEvent();
    event.title = "Meeting2";
    event.startTime = DateTime(2019,11,06);
    event.endTime = DateTime(2019,11,15);
    eventsList.add(event);
    CalendarEvent.setListAndUpdateMap(eventsList);
  }

UI with events would look like:

2
likes
40
pub points
34%
popularity

Publisher

unverified uploader

A custom calendar for flutter apps. It supports displaying events as a continuous UI.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

auto_size_text, flutter

More

Packages that depend on calendar_flutter