date_picker_timeline 1.1.3

  • Readme
  • Changelog
  • Example
  • Installing
  • 93

DatePickerTimeline #

Pub

Flutter Date Picker Library that provides a calendar as a horizontal timeline.

How To Use #

Import the following package in your dart file

import 'package:date_picker_timeline/date_picker_timeline.dart';

Usage #

Use the DatePickerTimeline Widget

    Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: <Widget>[
          DatePickerTimeline(
            DateTime.now(),
            onDateChange: (date) {
              // New date selected
              print(date.day.toString());
            },
          ),
        ],
    ),
Constructor: #
    DatePickerTimeline(
      this.currentDate, {
      Key key,
      this.width,
      this.height = 80,
      this.monthTextStyle = defaultMonthTextStyle,
      this.dayTextStyle = defaultDayTextStyle,
      this.dateTextStyle = defaultDateTextStyle,
      this.selectionColor = AppColors.defaultSelectionColor,
      this.daysCount = 50000,
      this.onDateChange,
      this.locale,
    }) : super(key: key);

Author #

Contributors #

[1.1.3] - 30/09/2019

  • Fixed issue with Locale not being initialized

[1.1.0] - 27/09/2019

  • Added Locale option to show date in different language
  • Added option to limit the number of date shown in the list
  • Added option to manage width and height of the timeline

[1.0.0] - 19/09/2019

  • Added ability to manage text style for month, date and day text.
  • Made changes to DatePickerTimeline constructor
  • First Major release

[0.0.3] - 13/09/2019

  • Fixed bug where passing date to constructor was not working

[0.0.2] - 05/09/2019

  • Updated Readme
  • Added Selected Time Display to the Demo App
  • Removed time from the selected date

[0.0.1] - 24/08/2019

  • Initial release.

example/README.md

example #

A new Flutter project.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

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


dependencies:
  date_picker_timeline: ^1.1.3

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:date_picker_timeline/date_picker_timeline.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
87
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
93
Learn more about scoring.

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

  • Dart: 2.7.0
  • pana: 0.13.1+4
  • Flutter: 1.12.13+hotfix.4

Health suggestions

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

Analysis of lib/date_picker_timeline.dart reported 1 hint:

line 10 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: DatePickerTimeline.width, DatePickerTimeline.height, DatePickerTimeline.monthTextStyle, DatePickerTimeline.dayTextStyle, DatePickerTimeline.dateTextStyle, DatePickerTimeline.selectionColor, DatePickerTimeline.currentDate, DatePickerTimeline.onDateChange, DatePickerTimeline.daysCount, DatePickerTimeline.locale

Format lib/date_widget.dart.

Run flutter format to format lib/date_widget.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
intl ^0.16.0 0.16.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
path 1.6.4
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test