Skip to content

Commit 8e058b4

Browse files
authored
[google_sign_in_ios, video_player] Specify types for pattern variable declarations (flutter#13362)
Adds explicit type annotations to pattern-declared local variables where the matched value's type is not syntactically obvious to satisfy `specify_nonobvious_local_variable_types` (blocking https://dart-review.googlesource.com/c/sdk/+/548220). ## Pre-Review Checklist
1 parent 66acaa8 commit 8e058b4

2 files changed

Lines changed: 16 additions & 4 deletions

File tree

‎packages/google_sign_in/google_sign_in_ios/lib/google_sign_in_ios.dart‎

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,11 @@ class GoogleSignInIOS extends GoogleSignInPlatform {
6161
switch (result) {
6262
case SignInFailure(type: GoogleSignInErrorCode.noAuthInKeychain):
6363
return null;
64-
case SignInFailure(:final type, :final message, :final details):
64+
case SignInFailure(
65+
:final GoogleSignInErrorCode type,
66+
:final String? message,
67+
:final Object? details,
68+
):
6569
throw GoogleSignInException(
6670
code: _exceptionCodeForErrorPlatformErrorCode(type),
6771
description: message,
@@ -86,7 +90,11 @@ class GoogleSignInIOS extends GoogleSignInPlatform {
8690
code: GoogleSignInExceptionCode.unknownError,
8791
description: 'No auth reported during interactive sign in.',
8892
);
89-
case SignInFailure(:final type, :final message, :final details):
93+
case SignInFailure(
94+
:final GoogleSignInErrorCode type,
95+
:final String? message,
96+
:final Object? details,
97+
):
9098
throw GoogleSignInException(
9199
code: _exceptionCodeForErrorPlatformErrorCode(type),
92100
description: message,
@@ -207,7 +215,11 @@ class GoogleSignInIOS extends GoogleSignInPlatform {
207215
SignInResult result,
208216
) async {
209217
switch (result) {
210-
case SignInFailure(:final type, :final message, :final details):
218+
case SignInFailure(
219+
:final GoogleSignInErrorCode type,
220+
:final String? message,
221+
:final Object? details,
222+
):
211223
throw GoogleSignInException(
212224
code: _exceptionCodeForErrorPlatformErrorCode(type),
213225
description: message,

‎packages/video_player/video_player/example/lib/video_tracks_demo.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ class _VideoTracksDemoState extends State<VideoTracksDemo> {
227227
label: const Text('Select Video'),
228228
inputDecorationTheme: const InputDecorationTheme(border: OutlineInputBorder()),
229229
dropdownMenuEntries: _sampleVideos.indexed.map(((int, String) record) {
230-
final (index, url) = record;
230+
final (int index, String url) = record;
231231
final label = url.contains('.m3u8')
232232
? 'HLS Stream ${index + 1}'
233233
: 'MP4 Video ${index + 1}';

0 commit comments

Comments
 (0)