[device_info] Fix pedantic errors (#2314)
diff --git a/packages/device_info/CHANGELOG.md b/packages/device_info/CHANGELOG.md
index e500051..cee8c3e 100644
--- a/packages/device_info/CHANGELOG.md
+++ b/packages/device_info/CHANGELOG.md
@@ -1,3 +1,8 @@
+## 0.4.1+3
+
+* Fix pedantic errors. Adds some missing documentation and fixes unawaited
+ futures in the tests.
+
## 0.4.1+2
* Remove AndroidX warning.
diff --git a/packages/device_info/analysis_options.yaml b/packages/device_info/analysis_options.yaml
deleted file mode 100644
index d4ccef6..0000000
--- a/packages/device_info/analysis_options.yaml
+++ /dev/null
@@ -1,11 +0,0 @@
-# This is a temporary file to allow us to land a new set of linter rules in a
-# series of manageable patches instead of one gigantic PR. It disables some of
-# the new lints that are already failing on this plugin, for this plugin. It
-# should be deleted and the failing lints addressed as soon as possible.
-
-include: ../../analysis_options.yaml
-
-analyzer:
- errors:
- public_member_api_docs: ignore
- unawaited_futures: ignore
diff --git a/packages/device_info/example/lib/main.dart b/packages/device_info/example/lib/main.dart
index 6ffae43..528604b 100644
--- a/packages/device_info/example/lib/main.dart
+++ b/packages/device_info/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 'dart:async';
import 'dart:io';
diff --git a/packages/device_info/example/test_driver/device_info_e2e_test.dart b/packages/device_info/example/test_driver/device_info_e2e_test.dart
index ff6e9ce..f3aa9e2 100644
--- a/packages/device_info/example/test_driver/device_info_e2e_test.dart
+++ b/packages/device_info/example/test_driver/device_info_e2e_test.dart
@@ -10,6 +10,6 @@
final FlutterDriver driver = await FlutterDriver.connect();
final String result =
await driver.requestData(null, timeout: const Duration(minutes: 1));
- driver.close();
+ await driver.close();
exit(result == 'pass' ? 0 : 1);
}
diff --git a/packages/device_info/lib/device_info.dart b/packages/device_info/lib/device_info.dart
index 60cd98f..e775227 100644
--- a/packages/device_info/lib/device_info.dart
+++ b/packages/device_info/lib/device_info.dart
@@ -8,6 +8,8 @@
/// Provides device and operating system information.
class DeviceInfoPlugin {
+ /// No work is done when instantiating the plugin. It's safe to call this
+ /// repeatedly or in performance-sensitive blocks.
DeviceInfoPlugin();
/// Channel used to communicate to native code.
diff --git a/packages/device_info/pubspec.yaml b/packages/device_info/pubspec.yaml
index 7e43f13..75dfe24 100644
--- a/packages/device_info/pubspec.yaml
+++ b/packages/device_info/pubspec.yaml
@@ -3,7 +3,7 @@
(make, model, etc.), and Android or iOS version the app is running on.
author: Flutter Team <flutter-dev@googlegroups.com>
homepage: https://github.com/flutter/plugins/tree/master/packages/device_info
-version: 0.4.1+2
+version: 0.4.1+3
flutter:
plugin: