diff --git a/packages/share/CHANGELOG.md b/packages/share/CHANGELOG.md index 877cafefb2b9..f10814a7fb0a 100644 --- a/packages/share/CHANGELOG.md +++ b/packages/share/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.6.3+3 + +* README update. + ## 0.6.3+2 * Remove AndroidX warnings. diff --git a/packages/share/README.md b/packages/share/README.md index 4536c5818b7d..3a3aa06d9799 100644 --- a/packages/share/README.md +++ b/packages/share/README.md @@ -9,16 +9,26 @@ Wraps the ACTION_SEND Intent on Android and UIActivityViewController on iOS. ## Usage + To use this plugin, add `share` as a [dependency in your pubspec.yaml file](https://flutter.io/platform-plugins/). ## Example -Import the library via +Import the library. + ``` dart import 'package:share/share.dart'; ``` -Then invoke the static `share` method anywhere in your Dart code +Then invoke the static `share` method anywhere in your Dart code. + ``` dart Share.share('check out my website https://example.com'); ``` + +The `share` method also takes an optional `subject` that will be used when +sharing to email. + +``` dart +Share.share('check out my website https://example.com', subject: 'Look what I made!'); +``` diff --git a/packages/share/analysis_options.yaml b/packages/share/analysis_options.yaml new file mode 100644 index 000000000000..4d3c53a24cab --- /dev/null +++ b/packages/share/analysis_options.yaml @@ -0,0 +1,11 @@ +# This exists to add a lint for missing API docs just on this specific package, +# since not all packages have coverage for all their public members yet and +# adding it in would be non-trivial. `public_member_api_docs` should be applied +# to new packages going forward, and ideally the main `analysis_options.yaml` +# file as soon as possible. + +include: ../../analysis_options.yaml + +linter: + rules: + - public_member_api_docs diff --git a/packages/share/example/lib/main.dart b/packages/share/example/lib/main.dart index 1eb04e0f3c64..b68195cd3507 100644 --- a/packages/share/example/lib/main.dart +++ b/packages/share/example/lib/main.dart @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// ignore_for_file: public_member_api_docs + import 'package:flutter/material.dart'; import 'package:share/share.dart'; diff --git a/packages/share/pubspec.yaml b/packages/share/pubspec.yaml index de376e8fb28b..0748bd2d9d8a 100644 --- a/packages/share/pubspec.yaml +++ b/packages/share/pubspec.yaml @@ -3,7 +3,7 @@ description: Flutter plugin for sharing content via the platform share UI, using the ACTION_SEND intent on Android and UIActivityViewController on iOS. author: Flutter Team homepage: https://github.com/flutter/plugins/tree/master/packages/share -version: 0.6.3+2 +version: 0.6.3+3 flutter: plugin: