calendarro 0.0.5

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 81

Calendarro #

Calendar widget library for Flutter apps. Offers multiple ways to customize the widget.

Getting Started #

Installation #

Add dependency to your pubspec.yaml:

calendarro: ^0.0.5

Basic use #

First, add an import to your code:

import 'package:calendarro/calendarro.dart';

Add a widget to your code:

Calendarro(
  startDate: DateUtils.getFirstDayOfCurrentMonth(),
  endDate: DateUtils.getLastDayOfCurrentMonth()
  )

alt tag

Customization #

alt tag

1. Display Mode - If you prefer to operate on multiple rows to see whole month, use:

Calendarro(
  displayMode: DisplayMode.MONTHS,
  ...
  )

2. Selection Mode - If you want to select multiple dates, use:

Calendarro(
  selectionMode: SelectionMode.MULTI,
  ...
  )

3. Weekday Labels - If you want to provide your own row widget for displaying weekday names, use:

Calendarro(
  weekdayLabelsRow: CustomWeekdayLabelsRow()
  ...
  )

you can create your CustomWeekdayLabelsRow by looking at default CalendarroWeekdayLabelsView.

4. Day Tile Builder - If you want to build day tiles your own way, you can use:

Calendarro(
  dayTileBuilder: CustomDayTileBuilder()
  ...
  )

you can create your CustomDayTileBuilder looking upon DefaultDayTileBuilder.

5. Initial selected dates - When you want some dates to be selected from the scratch, use selectedDate (SelectionMode.SINGLE) or selectedDates (SelectionMode.MULTI) arguments:

Calendarro(
  selectedDate: DateTime(2018, 8, 1)
  //or
  selectedDates: [DateTime(2018, 8, 1), DateTime(2018, 8, 8)]
  ...
  )

you can create your CustomDayTileBuilder looking upon DefaultDayTileBuilder.

Selecting date callback #

If you want to get a callback when a date tile is clicked, there is onTap param:

  Calendarro(
    onTap: (date) {
        //your code
    }
    ...
    )

Advanced usage: #

For more advanced usage see: https://github.com/adamstyrc/parking-app

[0.0.5] 17 November 2018

  • Fix counting pages for DisplayMode.WEEKS due to bug for February.

[0.0.4] 17 November 2018

  • Change Calendarro height in month mode

[0.0.3] 17 November 2018

  • Add onTap callback for Calendarro

[0.0.2] 3 September 2018

  • Fix

[0.0.1] - 6 August 2018

  • Introduce Calendarro!

example/README.md

sample #

sample app

Getting Started #

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

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  calendarro: ^0.0.5

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:calendarro/calendarro.dart';
  
Version Uploaded Documentation Archive
0.0.5 Feb 4, 2019 Go to the documentation of calendarro 0.0.5 Download calendarro 0.0.5 archive
0.0.4 Jan 3, 2019 Go to the documentation of calendarro 0.0.4 Download calendarro 0.0.4 archive
0.0.3 Nov 17, 2018 Go to the documentation of calendarro 0.0.3 Download calendarro 0.0.3 archive
0.0.2 Sep 3, 2018 Go to the documentation of calendarro 0.0.2 Download calendarro 0.0.2 archive
0.0.1 Aug 7, 2018 Go to the documentation of calendarro 0.0.1 Download calendarro 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
79
Health:
Code health derived from static analysis. [more]
97
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
66
Overall:
Weighted score of the above. [more]
81
Learn more about scoring.

We analyzed this package on Jun 25, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.3.2
  • pana: 0.12.18
  • Flutter: 1.5.4-hotfix.2

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Fix lib/calendarro.dart. (-1.49 points)

Analysis of lib/calendarro.dart reported 3 hints:

line 18 col 7: This class (or a class which this class inherits from) is marked as '@immutable', but one or more of its instance fields are not final: Calendarro.startDate, Calendarro.endDate, Calendarro.displayMode, Calendarro.selectionMode, Calendarro.dayTileBuilder, Calendarro.weekdayLabelsRow, Calendarro.onTap, Calendarro.selectedDate, Calendarro.selectedDates, Calendarro.startDayOffset, Calendarro.state

line 94 col 30: The operator x ~/ y is more efficient than (x / y).toInt().

line 232 col 7: Avoid empty statements.

Fix lib/calendarro_page.dart. (-1.49 points)

Analysis of lib/calendarro_page.dart reported 3 hints:

line 3 col 8: Unused import: 'package:calendarro/default_weekday_labels_row.dart'.

line 6 col 7: This class (or a class which this class inherits from) is marked as '@immutable', but one or more of its instance fields are not final: CalendarroPage.pageStartDate, CalendarroPage.pageEndDate, CalendarroPage.weekdayLabelsRow, CalendarroPage.startDayOffset

line 8 col 16: Name non-constant identifiers using lowerCamelCase.

Fix lib/default_day_tile.dart. (-0.50 points)

Analysis of lib/default_day_tile.dart reported 1 hint:

line 5 col 7: This class (or a class which this class inherits from) is marked as '@immutable', but one or more of its instance fields are not final: CalendarroDayItem.date, CalendarroDayItem.calendarroState, CalendarroDayItem.onTap

Fix additional 3 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/date_utils.dart (Run flutter format to format lib/date_utils.dart.)
  • lib/default_day_tile_builder.dart (Run flutter format to format lib/default_day_tile_builder.dart.)
  • lib/default_weekday_labels_row.dart (Run flutter format to format lib/default_weekday_labels_row.dart.)

Maintenance issues and suggestions

Support latest dependencies. (-5 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency.

The package description is too short. (-19 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >1.19.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test