add_to_calendar 1.0.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 75

add_to_calendar #

pub package

Flutter plugin that allows opening a native UI to add an event with custom parameters to user's calendar

Installation #

Declare a pubspec dependency in your Flutter project.

In iOS #

Add NSCalendarsUsageDescription String entry in your info.plist explaining why you require calendar access permissions.

What is it for? #

It allows developers

How to use it? #

You can check the Example app to see a real use case on how to trigger the native view to add custom events to user's calendar. Snippet of the main function of the plugin:

  /// Function responsible of triggering the native view to create a custom event in user's calendar using given parameters
  /// 
  /// [title] is String value of the title to be filled
  /// [startTime] DateTime with the start time of the event
  /// [endTime] DateTime with the end time of the event. Optional if [isAllDay] is true, required otherwise.
  /// [isAllDay] bool value stating if the event will be a full day event
  /// [location] optional String with the location of the event
  /// [description] optional String with the description of the event
  /// 
  static Future addToCalendar({
    @required String title,
    @required DateTime startTime,
    DateTime endTime,
    bool isAllDay = false,
    String location,
    String description,
  })

1.0.0 #

  • Fix crash on Android when parsing dates

0.0.2+2 #

  • Fix not matching meta version with flutter so documentation can be generated

0.0.2+1 #

  • Upgrade gradle plugins in android

0.0.2 #

  • Fix maintenance issues reported in pub.dev

0.0.1 #

  • Allow to trigger a mechanism (Intent in android and EventStore in iOS) to open a native component to add events into user's calendar

example/README.md

add_to_calendar_example #

Demonstrates how to use the add_to_calendar plugin.

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:
  add_to_calendar: ^1.0.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:add_to_calendar/add_to_calendar.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
51
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]
75
Learn more about scoring.

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

  • Dart: 2.5.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Format lib/add_to_calendar.dart.

Run flutter format to format lib/add_to_calendar.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
meta ^1.1.6 1.1.7
Transitive dependencies
collection 1.14.11 1.14.12
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
datetime_picker_formfield ^0.2.0
flutter_test
intl ^0.15.8
matcher ^0.12.5
mockito ^4.1.0
test ^1.6.3