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

Commit e7542a1

Browse files
author
Michael Klimushyn
authored
[google_sign_in_web] Fix pedantic lints (#2365)
1 parent 88793e6 commit e7542a1

File tree

8 files changed

+21
-17
lines changed

8 files changed

+21
-17
lines changed
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
## 0.8.1+1
2+
3+
* Add missing documentation.
4+
15
## 0.8.1
26

37
* Add podspec to enable compilation on iOS.
48

59
## 0.8.0
610

7-
* Flutter for web initial release
11+
* Flutter for web initial release

packages/google_sign_in/google_sign_in_web/analysis_options.yaml

Lines changed: 0 additions & 12 deletions
This file was deleted.

packages/google_sign_in/google_sign_in_web/lib/google_sign_in_web.dart

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,17 @@ import 'src/utils.dart' show gapiUserToPluginUserData;
1919
const String _kClientIdMetaSelector = 'meta[name=google-signin-client_id]';
2020
const String _kClientIdAttributeName = 'content';
2121

22+
/// This is only exposed for testing. It shouldn't be accessed by users of the
23+
/// plugin as it could break at any point.
2224
@visibleForTesting
2325
String gapiUrl = 'https://apis.google.com/js/platform.js';
2426

25-
/// Implementation of the google_sign_in plugin for Web
27+
/// Implementation of the google_sign_in plugin for Web.
2628
class GoogleSignInPlugin extends GoogleSignInPlatform {
29+
/// Constructs the plugin immediately and begins initializing it in the
30+
/// background.
31+
///
32+
/// The plugin is completely initialized when [initialized] completed.
2733
GoogleSignInPlugin() {
2834
_autoDetectedClientId = html
2935
.querySelector(_kClientIdMetaSelector)
@@ -34,12 +40,15 @@ class GoogleSignInPlugin extends GoogleSignInPlatform {
3440

3541
Future<void> _isGapiInitialized;
3642

43+
/// This is only exposed for testing. It shouldn't be accessed by users of the
44+
/// plugin as it could break at any point.
3745
@visibleForTesting
3846
Future<void> get initialized => _isGapiInitialized;
3947

4048
String _autoDetectedClientId;
4149
FutureOr<auth2.GoogleUser> _lastSeenUser;
4250

51+
/// Factory method that initializes the plugin with [GoogleSignInPlatform].
4352
static void registerWith(Registrar registrar) {
4453
GoogleSignInPlatform.instance = GoogleSignInPlugin();
4554
}

packages/google_sign_in/google_sign_in_web/lib/src/load_gapi.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ import 'utils.dart' show injectJSLibraries;
1717
external set gapiOnloadCallback(Function callback);
1818

1919
// This name must match the external setter above
20+
/// This is only exposed for testing. It shouldn't be accessed by users of the
21+
/// plugin as it could break at any point.
2022
@visibleForTesting
2123
const String kGapiOnloadCallbackFunctionName = "gapiOnloadCallback";
2224
String _addOnloadToScript(String url) => url.startsWith('data:')

packages/google_sign_in/google_sign_in_web/lib/src/utils.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ Future<void> injectJSLibraries(List<String> libraries,
2929
return Future.wait(loading);
3030
}
3131

32+
/// Utility method that converts `currentUser` to the equivalent
33+
/// [GoogleSignInUserData].
3234
GoogleSignInUserData gapiUserToPluginUserData(auth2.GoogleUser currentUser) {
3335
assert(currentUser != null);
3436
final auth2.BasicProfile profile = currentUser.getBasicProfile();

packages/google_sign_in/google_sign_in_web/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: Flutter plugin for Google Sign-In, a secure authentication system
33
for signing in with a Google account on Android, iOS and Web.
44
author: Flutter Team <flutter-dev@googlegroups.com>
55
homepage: https://github.com/flutter/plugins/tree/master/packages/google_sign_in/google_sign_in_web
6-
version: 0.8.1
6+
version: 0.8.1+1
77

88
flutter:
99
plugin:

packages/google_sign_in/google_sign_in_web/test/auth2_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ void main() {
4747
});
4848

4949
group('Successful .init, then', () {
50-
setUp(() async {
50+
setUp(() {
5151
plugin.init(
5252
hostedDomain: 'foo',
5353
scopes: <String>['some', 'scope'],

script/incremental_build.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ CUSTOM_ANALYSIS_PLUGINS=(
1717
"in_app_purchase"
1818
"camera"
1919
"google_sign_in/google_sign_in"
20-
"google_sign_in/google_sign_in_web"
2120
)
2221
# Comma-separated string of the list above
2322
readonly CUSTOM_FLAG=$(IFS=, ; echo "${CUSTOM_ANALYSIS_PLUGINS[*]}")

0 commit comments

Comments
 (0)