planner 0.1.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 60

Planner #

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

screenshot

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>();
entries.add(PlannerEntry(
    day: 0,
    hour: 12,
    minutes: 15,
    duration: 120, // in minutes
    title: 'entry 1',
    content: 'some content to show in this entry',
    color: Colors.blue
));

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/README.md

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:


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

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

  • Dart: 2.6.0
  • 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

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.

Dependencies

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.2
Transitive dependencies
async 2.3.0 2.4.0
boolean_selector 1.0.5
charcode 1.1.2
collection 1.14.11 1.14.12
matcher 0.12.5 0.12.6
meta 1.1.7 1.1.8
path 1.6.4
pedantic 1.8.0+1
quiver 2.0.5 2.1.2+1
sky_engine 0.0.99
source_span 1.5.5
stack_trace 1.9.3
stream_channel 2.0.0
string_scanner 1.0.5
term_glyph 1.1.0
test_api 0.2.5 0.2.11
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test 0.0.0