planner 0.1.0

Planner #

A calendar event scheduler interface. The widget is preferably used (almost) fullscreen. It displays events in a table.


Features #

  • Scrollable hours handle.
  • Scrollable days handle.
  • Zoomable event schedule.
  • Events can be moved after a long press.
  • Event start and ending can be changed by moving the handles (also with long press).
  • Callbacks are provided for tapping on an event and on the planner.
  • Also has a callback for when an events has been moved.

Getting Started #

Add the package to pubspec.yaml:

planner: ^0.0.1

Import planner:

import 'package:planner/planner.dart';

Events #

Planner expects a list with events of type PlannerEntry. The events are not based on DateTime to provide maximum flexibility. A PlannerEntry constructor accepts these arguments:

  • day (int) required
  • hour (int) required
  • minutes (int) defaults to 0
  • duration (int) in minutes, defaults to 60
  • title (String)
  • content (String)
  • color: (Color) required, this is the background color
var entries = List<PlannerEntry>();
    day: 0,
    hour: 12,
    minutes: 15,
    duration: 120, // in minutes
    title: 'entry 1',
    content: 'some content to show in this entry',

Planner #

The planner can be added as a child object. It needs a few arguments:

  • labels: (List<String>) required The day labels. This also determines how many dates are shown.
  • minHour: (int) required the earliest hour to show. Events earlier than this are not shown.
  • maxHour: (int) required the latest hour to show.
  • entries: (List<PlannerEntry>) required
  • blockHeight: (int) defaults to 40 the height of a date field, if no zooming is active
  • blockWidth: (int) defaults to 200 the width of a date field, if no zooming is active
  • onEntryChanged: Function(PlannerEntry) The callback called when an entry was changed. (Moved, start or duration has changed by dragging the event.)
  • onEntryDoubleTap: Function(PlannerEntry) The callback called when a double tap on the event happened.
  • onPlannerDoubleTap: Function(int day, int hour, int minute) The callback called when a double tap in the planner happened, without an event underneath.
Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Planner Demo'),
      body: Planner(
        labels: ['day 1', 'day 2', 'day 3', 'day 4', 'day 5'],
        minHour: 8,
        maxHour: 20,
        entries: entries,
        onEntryDoubleTap: onEntryDoubleTap,
        onPlannerDoubleTap: onPlannerDoubleTap,
        onEntryChanged: onEntryChanged,

[0.0.3] - 2019, April 29.

  • added git url

[0.0.2] - 2019, April 29.

  • fixed screenshot display in readme

[0.0.1] - 2019, April 29.

  • Initial Release.


example #

planner example

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:

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

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

  • Dart: 2.7.1
  • pana: 0.13.5
  • Flutter: 1.12.13+hotfix.7

Health issues and suggestions

Fix lib/planner_class.dart. (-57.81 points)

Analysis of lib/planner_class.dart failed with 3 errors:

line 163 col 21: The named parameter 'onLongPressDragStart' isn't defined.

line 168 col 21: The named parameter 'onLongPressDragUpdate' isn't defined.

line 173 col 21: The named parameter 'onLongPressDragUp' isn't defined.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
after_layout ^1.0.7 1.0.7+2
flutter 0.0.0
positioned_tap_detector ^1.0.2 1.0.3
vibration ^1.0.2 1.2.4
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies