stylable_calendar 0.1.3+hotfix.1

  • Readme
  • Changelog
  • Example
  • Installing
  • new66

stylable_calendar #

A calendar that is less complicated and can customize as you want.

Parameters available:

StylableCalendar({
    this.selectedDate, // Provide a DateTime object
    this.specialDays, // will mark with border. ex: [1, 4, 6]
    this.isLoading, // if needed to animate after some task
    this.highlightedDays, // will mark with dot. ex: [1, 4, 6]
    this.onNext, // (DateTime date) {}
    this.onPrevious, // (DateTime date) {}
    this.primaryColor = Colors.black54,
    this.primaryColorDark = Colors.black,
    this.secondaryColor = Colors.white,
    this.isCollapsed = false,
    this.isPreviousActive = false,
    this.isNextActive = false,
});

[0.1.3+hotfix.1] - The method 'contains' was called on null

[0.1.3] - Swipe to go back and forth.

  • Slide / swipe feature to calendar widget.
  • Parameter to keep calendar view collapsed (default to expand).
  • Default colors added to prevent color null issues.
  • Runnable example app.
  • Available parameters added to README.

[0.1.2] - Color is null issue fixed for google fonts.

  • Fixed: type 'Color' is not a subtype of type '() => void'
  • Next month laying to a complete row is fixed (Strict to only five rows).

[0.1.1] - 'sunday is the first day' Month View bug fixed.

  • Parameter for disabling previous and next month buttons.
  • Wrong month view when 'sunday is the first day' is fixed.

[0.1.0] - Bare minimum calendar.

  • Customizable Calendar with basic functionality.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:stylable_calendar/stylable_calendar.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: "Stylable Calendar example",
      home: HomePage(),
    );
  }
}

class HomePage extends StatefulWidget {
  @override
  _HomePageState createState() => new _HomePageState();
}

class _HomePageState extends State<HomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("Demo"),
      ),
      body: ListView(
        children: <Widget>[
          StylableCalendar(
//            specialDays: [20, 13, 6, 10],
//            highlightedDays: [1, 4, 5],
//            primaryColor: Theme.of(context).primaryColor,
//            primaryColorDark: Theme.of(context).primaryColorDark,
//            secondaryColor: Theme.of(context).primaryColorLight,
            // in this case to animate highlighted dots
            selectedDate: (DateTime date) {
              print(date);
            },
            onNext: (DateTime date) {
              print(date);
            },
            onPrevious: (DateTime date) {
              print(date);
            },
          ),
        ],
      ),
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  stylable_calendar: ^0.1.3+hotfix.1

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:stylable_calendar/stylable_calendar.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
33
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]
66
Learn more about scoring.

We analyzed this package on Mar 31, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6
  • Flutter: 1.12.13+hotfix.8

Health suggestions

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

Analysis of lib/stylable_calendar.dart reported 1 hint:

line 62 col 33: Close instances of dart.core.Sink.

Format lib/page_dragger.dart.

Run flutter format to format lib/page_dragger.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
dart_days ^0.0.7+hotfix.9 0.0.7+hotfix.9
flutter 0.0.0
google_fonts ^0.3.9 0.3.10
Transitive dependencies
async 2.4.1
charcode 1.1.3
collection 1.14.11 1.14.12
convert 2.1.1
crypto 2.1.4
http 0.12.0+4
http_parser 3.1.4
meta 1.1.8
path 1.6.4
path_provider 1.6.5
path_provider_macos 0.0.4
path_provider_platform_interface 1.0.1
pedantic 1.9.0
platform 2.2.1
plugin_platform_interface 1.0.2
sky_engine 0.0.99
source_span 1.7.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test