Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[connectivity] Lint for public DartDocs #2269

Merged
merged 1 commit into from
Nov 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/connectivity/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.4.5+5

* Add an analyzer check for the public documentation.

## 0.4.5+4

* Stability and Maintainability: update documentations.
Expand Down
11 changes: 11 additions & 0 deletions packages/connectivity/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions packages/connectivity/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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 'dart:async';
import 'dart:io';

Expand Down
17 changes: 11 additions & 6 deletions packages/connectivity/lib/connectivity.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,17 @@ import 'dart:io';
import 'package:flutter/services.dart';
import 'package:meta/meta.dart';

/// Connection Status Check Result
///
/// WiFi: Device connected via Wi-Fi
/// Mobile: Device connected to cellular network
/// None: Device not connected to any network
enum ConnectivityResult { wifi, mobile, none }
/// Connection status check result.
enum ConnectivityResult {
/// WiFi: Device connected via Wi-Fi
wifi,

/// Mobile: Device connected to cellular network
mobile,

/// None: Device not connected to any network
none
}

/// Discover network connectivity configurations: Distinguish between WI-FI and cellular, check WI-FI status and more.
class Connectivity {
Expand Down
2 changes: 1 addition & 1 deletion packages/connectivity/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Flutter plugin for discovering the state of the network (WiFi &
mobile/cellular) connectivity on Android and iOS.
author: Flutter Team <[email protected]>
homepage: https://github.com/flutter/plugins/tree/master/packages/connectivity
version: 0.4.5+4
version: 0.4.5+5

flutter:
plugin:
Expand Down