Git Product home page Git Product logo

flutter_calendar_carousel's Introduction

flutter_calendar_carousel

Pub Version Build Status License Coverage Status

Calendar widget for flutter that is swipeable horizontally. This widget can help you build your own calendar widget highly customizable. Now you can even add your icon for each event.

Rectangular style

image

Circular style

image

No border

image

Marked Dates

image

Custom Icon Events

image

Getting Started

For help getting started with Flutter, view our online documentation.

Props

props types defaultValues
viewPortFraction double 1.0
prevDaysTextStyle TextStyle
daysTextStyle TextStyle
nextDaysTextStyle TextStyle
prevMonthDayBorderColor Color Colors.transparent
thisMonthDayBorderColor Color Colors.transparent
nextMonthDayBorderColor Color Colors.transparent
dayPadding double 2.0
height double double.infinity
width double double.infinity
todayTextStyle TextStyle fontSize: 14.0, color: Colors.white
dayButtonColor Color Colors.red
todayBorderColor Color Colors.red
todayButtonColor Colors Colors.red
selectedDateTime DateTime
selectedDayTextStyle TextStyle fontSize: 14.0, color: Colors.white
selectedDayBorderColor Color Colors.green
selectedDayButtonColor Color Colors.green
daysHaveCircularBorder bool
onDayPressed Func
weekdayTextStyle TextStyle fontSize: 14.0, color: Colors.deepOrange
iconColor Color Colors.blueAccent
headerTextStyle TextStyle fontSize: 20.0, color: Colors.blue
headerText Text Text('${DateFormat.yMMM().format(this._dates[1])}')
weekendTextStyle TextStyle fontSize: 14.0, color: Colors.pinkAccent
markedDates List<DateTime> []
markedDatesMap Events null
markedDateColor Color Colors.blueAccent
markedDateWidget Color Positioned(child: Container(color: Colors.blueAccent, height: 4.0, width: 4.0), bottom: 4.0, left: 18.0);
markedDateShowIcon bool false
markedDateIconBorderColor Color
markedDateIconMaxShown int 2
markedDateIconMargin double 5.0
markedDateIconBuilder MarkedDateIconBuilder<T>
markedDateIconOffset double 5.0
markedDateMoreCustomDecoration Decoration
markedDateMoreCustomTextStyle TextStyle
headerMargin EdgetInsets const EdgeInsets.symmetric(vertical: 16.0)
headerTitleTouchable bool false
onHeaderTitlePressed Function () => _selectDateFromPicker()
showHeader bool
showHeaderButton bool
childAspectRatio double 1.0
weekDayMargin EdgeInsets const EdgeInsets.only(bottom: 4.0)
weekFormat bool false
locale String en
firstDayOfWeek int null
onCalendarChanged Function(DateTime)
minSelectedDate DateTime
maxSelectedDate DateTime
inactiveDaysTextStyle TextStyle
inactiveWeekendTextStyle TextStyle
weekDayFormat WeekdayFormat short
staticSixWeekFormat bool false
showOnlyCurrentMonthDate bool false

With CalendarCarousel<YourEventClass> and EventList<YourEventClass> you can specifiy a custom Event class.

Install

Add flutter_calendar_carousel as a dependency in pubspec.yaml For help on adding as a dependency, view the documentation.

Usage

import 'package:flutter_calendar_carousel/flutter_calendar_carousel.dart' show CalendarCarousel;
Widget widget() {
  return Container(
    margin: EdgeInsets.symmetric(horizontal: 16.0),
    child: CalendarCarousel<Event>(
      onDayPressed: (DateTime date) {
        this.setState(() => _currentDate = date);
      },
      weekendTextStyle: TextStyle(
        color: Colors.red,
      ),
      thisMonthDayBorderColor: Colors.grey,
//      weekDays: null, /// for pass null when you do not want to render weekDays
//      headerText: Container( /// Example for rendering custom header
//        child: Text('Custom Header'),
//      ),
//      markedDates: _markedDate,
      weekFormat: false,
      markedDatesMap: _markedDateMap,
      height: 420.0,
      selectedDateTime: _currentDate,
      daysHaveCircularBorder: false, /// null for not rendering any border, true for circular border, false for rectangular border
    ),
  );
}

TODO

  • Render weekdays.
  • Customizable headerWidget.
  • Set weekdays visibility.
  • Customizable textStyles for days in weekend.
  • Marked Dates.
  • Multiple Marked Dates.
  • Customizable weekend days.
  • Week Calendar.
  • Carousel Week Calendar.
  • Multiple days selections.
  • Widget test.

Help Maintenance

I've been maintaining quite many repos these days and burning out slowly. If you could help me cheer up, buying me a cup of coffee will make my life really happy and get much energy out of it.
Buy Me A Coffee

flutter_calendar_carousel's People

Contributors

hyochan avatar edgartrem avatar edtheguy00 avatar icemanbsi avatar lucasvienna avatar the-redhat avatar akuma06 avatar mashnoon33 avatar mehndirattapiyush avatar thayesx avatar solidaycl avatar cristoferfb2 avatar letsar avatar pauluhn avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.