samderlust / calendar_day_view

MIT License
6 stars 11 forks source link

"Buy Me A Coffee"

BREAKING CHANGES in version 3. please prefer to Changelogs

Example here: https://samderlust.github.io/calendardayview

Calendar Day View - A fully customizable Calendar day view library

This package is dedicated to calendar day view. While there are many calendar package out there. It seems that not many of them support Day view well. This package clearly is not a calendar replacement but rather a complement to make calendar in app better. This package aims to give user most customization they want.

Features

Installing and import the library:

Like any other package, add the library to your pubspec.yaml dependencies:

dependencies:
    calendar_day_view: <latest_version>

Then import it wherever you want to use it:

import 'package:calendar_day_view/calendar_day_view.dart';

Usage

look at example folder for all use cases

Category Day View

Overflow Day View

Overflow Day View
Overflow normal Overflow with ListView
Overflow Day View Overflow Day View
renderRowAsListView: false renderRowAsListView: true
 CalendarDayView.overflow(
            events: events,
            dividerColor: Colors.black,
            currentDate: DateTime.now(),
            timeGap: 60,
            renderRowAsListView: true,
            showCurrentTimeLine: true,
            showMoreOnRowButton: true,
            overflowItemBuilder: (context, constraints, event) {
              return <<ItemWidget>>
            },
          )

Event Only Day View

event only day view
 CalendarDayView.eventOnly(
      events: events,
      eventDayViewItemBuilder: (context, event) {
        return Container(
          color: getRandomColor(),
          height: 50,
          child: Text(event.value),
        );
      },
    );

In Row Day View

In Row Day View
InRowCalendarDaCalendarDayView<String>.inRow(
            events: events,
            heightPerMin: 1,
            showCurrentTimeLine: true,
            dividerColor: Colors.black,
            timeGap: 15,
            currentDate: DateTime.now(),
            showWithEventOnly: withEventOnly.value,
            startOfDay: const TimeOfDay(hour: 00, minute: 0),
            endOfDay: const TimeOfDay(hour: 22, minute: 0),
            itemBuilder: (context, constraints, event) => Flexible(
              child:<<ITEM WIDGET>>
            ),
          ),

Appreciate Your Feedbacks and Contributes

If you find anything need to be improve or want to request a feature. Please go ahead and create an issue in the Github repo