day_calendar_flutter 1.1.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 74

Day Calendar #

Pub Package

github-smallgithub-small
Day calendar with custom stylesDay calendar with all day feature

Usage #

Make sure to check out example project.

Installation #

Attention use of package flutter_localizations is required

Add to pubspec.yaml:

dependencies:
  day_calendar_flutter: ^1.1.0

flutter_localizations:
  sdk: flutter

Implements the code below in your MaterialApp

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      localizationsDelegates: [
        GlobalMaterialLocalizations.delegate,
        GlobalWidgetsLocalizations.delegate,
      ],
      supportedLocales: [const Locale('pt', 'BR')],
      locale: Locale('pt', 'BR'),
    );
  }

Import the package in your projetct

import 'package:day_calendar_flutter/day_calendar_flutter.dart';

Use the package in your project

@override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Column(
        children: <Widget>[
          DayCalendarFlutter(
            currentDate: DateTime.now(),
            initialHour: 06,
            finalHour: 22,
            events: [
              new Event(
                color: Colors.cyan,
                initialDate: DateTime(2020, 05, 26, 13, 00),
                finalDate:  DateTime(2020, 05, 26, 13, 30),
                title: "Reunião",
                eventTitleStyle: TextStyle(
                  fontSize: 22,
                  fontWeight: FontWeight.bold,
                ),
                showHours: true,
                allDay: true,
                onEventTap: (event) {
                  print(event)
                }
              ),
            ],
            onTap: (date) {
              print(DateFormat('HH:mm').format(date));
            },
          ),
        ]
      )
    );
  }

[1.0.0] - Add release date #

  • Finished Calendar.

[1.0.1] - Add release date #

  • Changed License.

[1.0.3] - Add release date #

  • Changed Readme.md.

[1.0.4] - Add release date #

  • Bug fix.
  • add showHeader parameter.

[1.0.5] - Add release date #

  • add parameter for custom header.

[1.0.6] - Add release date #

  • Bug fix.

[1.0.7] - Add release date #

  • add event Tap in Event class.

[1.0.8] - Add release date #

  • changed the way events are rendered

[1.0.9] - Add release date #

  • add parameter for set if can change page

[1.1.0] - Add release date #

  • add feature for all day events

example/lib/main.dart

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

import 'app/app_module.dart';

void main() => runApp(ModularApp(module: AppModule()));

Use this package as a library

1. Depend on it

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


dependencies:
  day_calendar_flutter: ^1.1.0

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

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

  • Dart: 2.8.4
  • pana: 0.13.13
  • Flutter: 1.17.5

Analysis suggestions

Package not compatible with SDK dart

because of import path [day_calendar_flutter] that is in a package requiring null.

Package not compatible with runtime flutter-web on web

Because of the import of dart:io via the import chain package:day_calendar_flutter/day_calendar_flutter.dartpackage:day_calendar_flutter/src/day_calendar.dartpackage:date_util/date_util.dartpackage:date_util/src/dateUtil_base.dartdart:io

Health suggestions

Fix lib/src/day_calendar.dart. (-0.50 points)

Analysis of lib/src/day_calendar.dart reported 1 hint:

line 9 col 7: This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its instance fields aren't final: DayCalendarFlutter.currentDate, DayCalendarFlutter.events

Format lib/src/utils/models/event.dart.

Run flutter format to format lib/src/utils/models/event.dart.

Maintenance suggestions

The package description is too short. (-20 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.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
date_util >=0.1.4 <2.0.0 0.1.4
flutter 0.0.0
flutter_mobx >=1.0.1 <2.0.0 1.1.0+1
intl >=0.16.0 <2.0.0 0.16.1
mobx >=1.0.2+2 <2.0.0 1.2.1+1
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8
path 1.7.0
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8
Dev dependencies
build_runner ^1.8.0
flutter_test
mobx_codegen ^1.0.2