calendar_vertical_scroll 0.0.5

Makes an interesting splash effect when tapping its child widget.

Getting Started #

To use this plugin, add calendar_vertical_scroll as a dependency in your pubspec.yaml file.

This is the calendar for the scenarios like Birthday, booking and future years. Booking has two options single date pick and range date pick. birthday and future calendar has year selection functions.

Birthday calendar (select past years) #

     CalendarChoose(
                     Calendar.BIRTHDAY,
                     currentDateFontColor: Colors.blue,
                     currentDateBackgroundColor:
                     Colors.amberAccent,
                     selectionBackgroundColor: Colors.amber,
                     selectionFontColor: Colors.green,
                  )));

Booking Calendar (from current month to next 12 months) #

 CalendarChoose(Calendar.BOOKING)));

single date pick Booking Calendar (from current month to next 12 months) #

 CalendarChoose(Calendar.BOOKING)));

Range date pick Booking Calendar (from current month to next 12 months) #

  CalendarChoose.range()));

future year can be pick ,future Calendar (from current month to next 12 months) #

   CalendarChoose(Calendar.FUTUREYEARS)));

Example #

import 'package:calendar_vertical/day_details_model.dart';
import 'package:flutter/material.dart';
import 'calendar.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  String strDate = "";

  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Scaffold(
      appBar: AppBar(
        title: Text("Calendar Select Date"),
      ),
      body: Container(
        child: Center(
          child: Column(
            children: <Widget>[
              Text(strDate),
              RaisedButton(
                  onPressed: () async {
                    strDate = await Navigator.push(
                        context,
                        MaterialPageRoute(
                            builder: (context) => CalendarChoose(
                                  Calendar.BIRTHDAY,
                                  currentDateFontColor: Colors.blue,
                                  currentDateBackgroundColor:
                                      Colors.amberAccent,
                                  selectionBackgroundColor: Colors.amber,
                                  selectionFontColor: Colors.green,
                                )));
                    if (strDate == null) strDate = "";
                  },
                  child: Text("Birthday")),
              RaisedButton(
                  onPressed: () async {
                    strDate = await Navigator.push(
                        context,
                        MaterialPageRoute(
                            builder: (context) =>
                                CalendarChoose(Calendar.BOOKING)));
                    if (strDate == null) strDate = "";
                  },
                  child: Text("Booking")),
              RaisedButton(
                  onPressed: () async {
                    strDate = await Navigator.push(
                        context,
                        MaterialPageRoute(
                            builder: (context) => CalendarChoose.range()));
                    if (strDate == null) strDate = "";
                  },
                  child: Text("Booking range")),
              RaisedButton(
                  onPressed: () async {
                    strDate = await Navigator.push(
                        context,
                        MaterialPageRoute(
                            builder: (context) =>
                                CalendarChoose(Calendar.FUTUREYEARS)));
                    if (strDate == null) strDate = "";
                  },
                  child: Text("future years")),
            ],
          ),
        ),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

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


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

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

  • Dart: 2.6.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.6

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health issues and suggestions

Document public APIs. (-0.05 points)

89 out of 92 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Fix lib/src/calendar_chooser.dart. (-3.93 points)

Analysis of lib/src/calendar_chooser.dart reported 8 hints, including:

line 14 col 17: Name non-constant identifiers using lowerCamelCase.

line 15 col 17: Name non-constant identifiers using lowerCamelCase.

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

line 17 col 17: Name non-constant identifiers using lowerCamelCase.

line 19 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: CalendarChoose.type, CalendarChoose.currentDateBackgroundColor, CalendarChoose.currentDateFontColor, CalendarChoose.rangeStartEndBackgroundColor, CalendarChoose.innerRangeBackgroundColor, CalendarChoose.selectionBackgroundColor, CalendarChoose.selectionFontColor

Format lib/calendar_vertical_scroll.dart.

Run flutter format to format lib/calendar_vertical_scroll.dart.

Format lib/src/day_details_model.dart.

Run flutter format to format lib/src/day_details_model.dart.

Format lib/src/scrolling_years_calendar.dart.

Run flutter format to format lib/src/scrolling_years_calendar.dart.

Format lib/src/year_title.dart.

Run flutter format to format lib/src/year_title.dart.

Maintenance issues and suggestions

Provide a file named CHANGELOG.md. (-20 points)

Changelog entries help developers follow the progress of your package. See the example generated by stagehand.

Support latest dependencies. (-10 points)

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

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and calendar_vertical_scroll.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

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 >=2.1.0 <3.0.0
flutter 0.0.0
intl ^0.15.8 0.15.8 0.16.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.7 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