Skip to content

Commit

Permalink
Update & sync README files for all packages (fluttercommunity#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpnurmi authored Oct 12, 2020
1 parent 9e7616c commit b7561a0
Show file tree
Hide file tree
Showing 16 changed files with 112 additions and 293 deletions.
28 changes: 7 additions & 21 deletions packages/battery_plus_platform_interface/README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,12 @@
# battery_plus_platform_interface
# Battery Plus Platform Interface

A common platform interface for the [`battery_plus`][1] plugin.
[![Flutter Community: battery_plus_platform_interface](https://fluttercommunity.dev/_github/header/battery_plus_platform_interface)](https://github.com/fluttercommunity/community)

This interface allows platform-specific implementations of the `battery_plus`
plugin, as well as the plugin itself, to ensure they are supporting the
same interface.
[![pub package](https://img.shields.io/pub/v/battery_plus_platform_interface.svg)](https://pub.dev/packages/battery_plus_platform_interface)

# Usage
A common platform interface for [`battery_plus`](https://pub.dev/packages/battery_plus).

To implement a new platform-specific implementation of `battery_plus`, extend
[`BatteryPlatform`][2] with an implementation that performs the
platform-specific behavior, and when you register your plugin, set the default
`BatteryPlatform` by calling
`BatteryPlatform.instance = MyPlatformBattery()`.
## Usage

# Note on breaking changes

Strongly prefer non-breaking changes (such as adding a method to the interface)
over breaking changes for this package.

See https://flutter.dev/go/platform-interface-breaking-changes for a discussion
on why a less-clean interface is preferable to a breaking change.

[1]: ../
[2]: lib/batteru_plus_platform_interface.dart
This package is already included as part of the `battery_plus` package dependency, and will
be included when using `battery_plus` as normal.
13 changes: 10 additions & 3 deletions packages/battery_plus_web/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# battery_plus_web
# Battery Plus Web

Web implementation of [`battery_plus`][1]
[![Flutter Community: battery_plus_web](https://fluttercommunity.dev/_github/header/battery_plus_web)](https://github.com/fluttercommunity/community)

[1]: ../
[![pub package](https://img.shields.io/pub/v/battery_plus_web.svg)](https://pub.dev/packages/battery_plus_web)

The Web implementation of [`battery_plus`](https://pub.dev/packages/battery_plus).

## Usage

This package is already included as part of the `battery_plus` package dependency, and will
be included when using `battery_plus` as normal.
26 changes: 19 additions & 7 deletions packages/connectivity_plus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@ This plugin works for iOS and Android.
> Note that on Android, this does not guarantee connection to Internet. For instance,
the app might have wifi access but it might be a VPN or a hotel WiFi with no access.

**Please set your constraint to `connectivity: '>=0.4.y+x <2.0.0'`**

## Backward compatible 1.0.0 version is coming
The plugin has reached a stable API, we guarantee that version `1.0.0` will be backward compatible with `0.4.y+z`.
Please use `connectivity: '>=0.4.y+x <2.0.0'` as your dependency constraint to allow a smoother ecosystem migration.
For more details see: https://github.com/flutter/flutter/wiki/Package-migration-to-1.0.0

## Usage

Sample usage to check current status:
Expand Down Expand Up @@ -107,6 +100,25 @@ To request location authorization, make sure to add the following keys to your _
* `NSLocationAlwaysAndWhenInUseUsageDescription` - describe why the app needs access to the user’s location information all the time (foreground and background). This is called _Privacy - Location Always and When In Use Usage Description_ in the visual editor.
* `NSLocationWhenInUseUsageDescription` - describe why the app needs access to the user’s location information when the app is running in the foreground. This is called _Privacy - Location When In Use Usage Description_ in the visual editor.

## Limitations on the web platform

In order to retrieve information about the quality/speed of a browser's connection, the web implementation of the `connectivity` plugin uses the browser's [**NetworkInformation** Web API](https://developer.mozilla.org/en-US/docs/Web/API/NetworkInformation), which as of this writing (June 2020) is still "experimental", and not available in all browsers:

![Data on support for the netinfo feature across the major browsers from caniuse.com](https://caniuse.bitsofco.de/image/netinfo.png)

On desktop browsers, this API only returns a very broad set of connectivity statuses (One of `'slow-2g', '2g', '3g', or '4g'`), and may *not* provide a Stream of changes. Firefox still hasn't enabled this feature by default.

**Fallback to `navigator.onLine`**

For those browsers where the NetworkInformation Web API is not available, the plugin falls back to the [**NavigatorOnLine** Web API](https://developer.mozilla.org/en-US/docs/Web/API/NavigatorOnLine), which is more broadly supported:

![Data on support for the online-status feature across the major browsers from caniuse.com](https://caniuse.bitsofco.de/image/online-status.png)


The NavigatorOnLine API is [provided by `dart:html`](https://api.dart.dev/stable/2.7.2/dart-html/Navigator/onLine.html), and only supports a boolean connectivity status (either online or offline), with no network speed information. In those cases the plugin will return either `wifi` (when the browser is online) or `none` (when it's not).

Other than the approximate "downlink" speed, where available, and due to security and privacy concerns, **no Web browser will provide** any specific information about the actual network your users' device is connected to, like **the SSID on a Wi-Fi, or the MAC address of their device.**

## Getting Started

For help getting started with Flutter, view our online
Expand Down
33 changes: 4 additions & 29 deletions packages/connectivity_plus_macos/README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,12 @@
# connectivity_plus_macos
# Connectivity Plus macOS

[![Flutter Community: connectivity_plus_macos](https://fluttercommunity.dev/_github/header/connectivity_plus_macos)](https://github.com/fluttercommunity/community)

[![pub package](https://img.shields.io/pub/v/connectivity_plus_macos.svg)](https://pub.dev/packages/connectivity_plus_macos)


The macos implementation of [`connectivity_plus`].

**Please set your constraint to `connectivity_macos: '>=0.1.y+x <2.0.0'`**

## Backward compatible 1.0.0 version is coming
The plugin has reached a stable API, we guarantee that version `1.0.0` will be backward compatible with `0.1.y+z`.
Please use `connectivity_macos: '>=0.1.y+x <2.0.0'` as your dependency constraint to allow a smoother ecosystem migration.
For more details see: https://github.com/flutter/flutter/wiki/Package-migration-to-1.0.0
The macOS implementation of [`connectivity_plus`](https://pub.dev/packages/connectivity_plus).

## Usage

### Import the package


This package has been endorsed, meaning that you only need to add `connectivity_plus`
as a dependency in your `pubspec.yaml`. It will be automatically included in your app
when you depend on `package:connectivity_plus`.

This is what the above means to your `pubspec.yaml`:

```yaml
...
dependencies:
...
connectivity_plus: ^0.4.9
...
```

Refer to the `connectivity_plus` [documentation](https://github.com/fluttercommunity/connectivity_plus) for more details.

This package is already included as part of the `connectivity_plus` package dependency, and will
be included when using `connectivity_plus` as normal.
28 changes: 5 additions & 23 deletions packages/connectivity_plus_platform_interface/README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,12 @@
# connectivity_plus_platform_interface
# Connectivity Plus Platform Interface

[![Flutter Community: connectivity_plus_platform_interface](https://fluttercommunity.dev/_github/header/connectivity_plus_platform_interface)](https://github.com/fluttercommunity/community)

[![pub package](https://img.shields.io/pub/v/connectivity_plus_platform_interface.svg)](https://pub.dev/packages/connectivity_plus_platform_interface)

A common platform interface for the [`connectivity_plus`][1] plugin.
A common platform interface for [`connectivity_plus`](https://pub.dev/packages/connectivity_plus).

This interface allows platform-specific implementations of the `connectivity_plus`
plugin, as well as the plugin itself, to ensure they are supporting the
same interface.
## Usage

# Usage

To implement a new platform-specific implementation of `connectivity_plus`, extend
[`ConnectivityPlatform`][2] with an implementation that performs the
platform-specific behavior, and when you register your plugin, set the default
`ConnectivityPlatform` by calling
`ConnectivityPlatform.instance = MyPlatformConnectivity()`.

# Note on breaking changes

Strongly prefer non-breaking changes (such as adding a method to the interface)
over breaking changes for this package.

See https://flutter.dev/go/platform-interface-breaking-changes for a discussion
on why a less-clean interface is preferable to a breaking change.

[1]: ../
[2]: lib/connectivity_plus_platform_interface.dart
This package is already included as part of the `connectivity_plus` package dependency, and will
be included when using `connectivity_plus` as normal.
62 changes: 4 additions & 58 deletions packages/connectivity_plus_web/README.md
Original file line number Diff line number Diff line change
@@ -1,66 +1,12 @@
# connectivity_plus_web
# Connectivity Plus Web

[![Flutter Community: connectivity_plus_web](https://fluttercommunity.dev/_github/header/connectivity_plus_web)](https://github.com/fluttercommunity/community)

[![pub package](https://img.shields.io/pub/v/connectivity_plus_web.svg)](https://pub.dev/packages/connectivity_plus_web)

A web implementation of [connectivity](https://pub.dev/connectivity_plus/connectivity_plus). Currently this package uses an experimental API, with a fallback to dart:html, so not all features may be available to all browsers.
The Web implementation of [`connectivity_plus`](https://pub.dev/packages/connectivity_plus).

## Usage

### Import the package

This package is a non-endorsed implementation of `connectivity_plus` for the web platform, so you need to modify your `pubspec.yaml` to use it:

```yaml
...
dependencies:
...
connectivity_plus: ^0.4.9
connectivity_plus_web: ^0.3.0
...
...
```

## Example

Find the example wiring in the [Google sign-in example application](https://github.com/fluttercommunity/connectivity_plus/connectivity_plus/example/lib/main.dart).

## Limitations on the web platform

In order to retrieve information about the quality/speed of a browser's connection, the web implementation of the `connectivity` plugin uses the browser's [**NetworkInformation** Web API](https://developer.mozilla.org/en-US/docs/Web/API/NetworkInformation), which as of this writing (June 2020) is still "experimental", and not available in all browsers:

![Data on support for the netinfo feature across the major browsers from caniuse.com](https://caniuse.bitsofco.de/image/netinfo.png)

On desktop browsers, this API only returns a very broad set of connectivity statuses (One of `'slow-2g', '2g', '3g', or '4g'`), and may *not* provide a Stream of changes. Firefox still hasn't enabled this feature by default.

**Fallback to `navigator.onLine`**

For those browsers where the NetworkInformation Web API is not available, the plugin falls back to the [**NavigatorOnLine** Web API](https://developer.mozilla.org/en-US/docs/Web/API/NavigatorOnLine), which is more broadly supported:

![Data on support for the online-status feature across the major browsers from caniuse.com](https://caniuse.bitsofco.de/image/online-status.png)


The NavigatorOnLine API is [provided by `dart:html`](https://api.dart.dev/stable/2.7.2/dart-html/Navigator/onLine.html), and only supports a boolean connectivity status (either online or offline), with no network speed information. In those cases the plugin will return either `wifi` (when the browser is online) or `none` (when it's not).

Other than the approximate "downlink" speed, where available, and due to security and privacy concerns, **no Web browser will provide** any specific information about the actual network your users' device is connected to, like **the SSID on a Wi-Fi, or the MAC address of their device.**

## Contributions and Testing

Tests are crucial to contributions to this package. All new contributions should be reasonably tested.

In order to run tests in this package, do:

```
cd test
flutter run -d chrome
```

All contributions to this package are welcome. Read the [Contributing to Flutter Plugins](https://github.com/flutter/plugins/blob/master/CONTRIBUTING.md) guide to get started.

## Issues and feedback

Please file an [issue](https://github.com/fluttercommunity/connectivity_plus/issues/new)
to send feedback or report a bug.

**Thank you!**
This package is already included as part of the `connectivity_plus` package dependency, and will
be included when using `connectivity_plus` as normal.
29 changes: 5 additions & 24 deletions packages/device_info_plus_platform_interface/README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,12 @@
# device_info_platform_interface

# Device Info Plus Platform Interface

[![Flutter Community: device_info_plus_platform_interface](https://fluttercommunity.dev/_github/header/device_info_plus_platform_interface)](https://github.com/fluttercommunity/community)

[![pub package](https://img.shields.io/pub/v/device_info_plus_platform_interface.svg)](https://pub.dev/packages/device_info_plus_platform_interface)

A common platform interface for the [`device_info_plus`][1] plugin.

This interface allows platform-specific implementations of the `device_info`
plugin, as well as the plugin itself, to ensure they are supporting the
same interface.

# Usage

To implement a new platform-specific implementation of `device_info_plus`, extend
[`DeviceInfoPlatform`][2] with an implementation that performs the
platform-specific behavior, and when you register your plugin, set the default
`DeviceInfoPlatform` by calling
`DeviceInfoPlatform.instance = MyPlatformDeviceInfo()`.

# Note on breaking changes

Strongly prefer non-breaking changes (such as adding a method to the interface)
over breaking changes for this package.
A common platform interface for [`device_info_plus`](https://pub.dev/packages/device_info_plus).

See https://flutter.dev/go/platform-interface-breaking-changes for a discussion
on why a less-clean interface is preferable to a breaking change.
## Usage

[1]: ../device_info
[2]: lib/device_info_platform_interface.dart
This package is already included as part of the `device_info_plus` package dependency, and will
be included when using `device_info_plus` as normal.
13 changes: 10 additions & 3 deletions packages/device_info_plus_web/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# device_info_plus_web
# Device Info Plus Web

web implementation of [device_info_plus][1]
[![Flutter Community: device_info_plus_web](https://fluttercommunity.dev/_github/header/device_info_plus_web)](https://github.com/fluttercommunity/community)

[1]: ../
[![pub package](https://img.shields.io/pub/v/device_info_plus_web.svg)](https://pub.dev/packages/device_info_plus_web)

The Web implementation of [`device_info_plus`](https://pub.dev/packages/device_info_plus).

## Usage

This package is already included as part of the `device_info_plus` package dependency, and will
be included when using `device_info_plus` as normal.
7 changes: 0 additions & 7 deletions packages/package_info_plus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@
This Flutter plugin provides an API for querying information about an
application package.

**Please set your constraint to `package_info_plus: '>=0.4.y+x <2.0.0'`**

## Backward compatible 1.0.0 version is coming
The package_info plugin has reached a stable API, we guarantee that version `1.0.0` will be backward compatible with `0.4.y+z`.
Please use `package_info: '>=0.4.y+x <2.0.0'` as your dependency constraint to allow a smoother ecosystem migration.
For more details see: https://github.com/flutter/flutter/wiki/Package-migration-to-1.0.0

# Usage

You can use the PackageInfo to query information about the
Expand Down
36 changes: 7 additions & 29 deletions packages/package_info_plus_macos/README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,12 @@
# package_info_plus_macos
# Package Info Plus macOS

The macos implementation of [`package_info_plus`][1].
[![Flutter Community: package_info_plus_macos](https://fluttercommunity.dev/_github/header/package_info_plus_macos)](https://github.com/fluttercommunity/community)

## Usage

### Import the package

This package has been endorsed, meaning that you only need to add `package_info_plus`
as a dependency in your `pubspec.yaml`. It will be automatically included in your app
when you depend on `package:package_info_plus`.
[![pub package](https://img.shields.io/pub/v/package_info_plus_macos.svg)](https://pub.dev/packages/package_info_plus_macos)

This is what the above means to your `pubspec.yaml`:
The macOS implementation of [`package_info_plus`](https://pub.dev/packages/package_info_plus).

```yaml
...
dependencies:
...
package_info_plus: ^0.4.5
...
```

If you wish to use the macos package only, you can add `package_info_plus_macos` as a
dependency:

```yaml
...
dependencies:
...
package_info_plus_macos: ^0.0.1
...
```
## Usage

[1]: ../package_info_plus/package_info_plus
This package is already included as part of the `package_info_plus` package dependency, and will
be included when using `package_info_plus` as normal.
28 changes: 7 additions & 21 deletions packages/package_info_plus_platform_interface/README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,12 @@
# package_info_plus_platform_interface
# Package Info Plus Platform Interface

A common platform interface for the [`package_info_plus`][1] plugin.
[![Flutter Community: package_info_plus_platform_interface](https://fluttercommunity.dev/_github/header/package_info_plus_platform_interface)](https://github.com/fluttercommunity/community)

This interface allows platform-specific implementations of the `package_info_plus`
plugin, as well as the plugin itself, to ensure they are supporting the
same interface.
[![pub package](https://img.shields.io/pub/v/package_info_plus_platform_interface.svg)](https://pub.dev/packages/package_info_plus_platform_interface)

# Usage
A common platform interface for [`package_info_plus`](https://pub.dev/packages/package_info_plus).

To implement a new platform-specific implementation of `package_info_plus`, extend
[`PackageInfoPlatform`][2] with an implementation that performs the
platform-specific behavior, and when you register your plugin, set the default
`PackageInfoPlatform` by calling
`PackageInfoPlatform.instance = MyPlatformPackageInfo()`.
## Usage

# Note on breaking changes

Strongly prefer non-breaking changes (such as adding a method to the interface)
over breaking changes for this package.

See https://flutter.dev/go/platform-interface-breaking-changes for a discussion
on why a less-clean interface is preferable to a breaking change.

[1]: ../package_info_plus
[2]: lib/package_info_platform_interface.dart
This package is already included as part of the `package_info_plus` package dependency, and will
be included when using `package_info_plus` as normal.
Loading

0 comments on commit b7561a0

Please sign in to comment.