[roll] Update third-party dart packages
Roller-URL: https://ci.chromium.org/b/8841800593156210640
Cq-Cl-Tag: roller-builder:flutter-with-deps-roller
Cq-Cl-Tag: roller-bid:8841800593156210640
CQ-Do-Not-Cancel-Tryjobs: true
Change-Id: I462b1a4286b8a40a22e24a3c13dd6e8aed5da5f7
Reviewed-on: https://fuchsia-review.googlesource.com/c/third_party/dart-pkg/+/554702
Reviewed-by: GI Roller <global-integration-roller@fuchsia-infra.iam.gserviceaccount.com>
Commit-Queue: GI Roller <global-integration-roller@fuchsia-infra.iam.gserviceaccount.com>
diff --git a/source_gen/BUILD.gn b/source_gen/BUILD.gn
index 8c8d306..d2d9ef7 100644
--- a/source_gen/BUILD.gn
+++ b/source_gen/BUILD.gn
@@ -1,4 +1,4 @@
-# This file is generated by package_importer.py for source_gen-1.0.2
+# This file is generated by package_importer.py for source_gen-1.0.3
import("//build/dart/dart_library.gni")
diff --git a/source_gen/CHANGELOG.md b/source_gen/CHANGELOG.md
index 4410ee5..164747b 100644
--- a/source_gen/CHANGELOG.md
+++ b/source_gen/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 1.0.3
+
+* Allow the latest version of `package:analyzer`.
+
## 1.0.2
* Fix `TypeChecker.fromRuntimeType` for types that come from non-package uris.
diff --git a/source_gen/lib/src/constants/revive.dart b/source_gen/lib/src/constants/revive.dart
index 9926f3f..95cdfb3 100644
--- a/source_gen/lib/src/constants/revive.dart
+++ b/source_gen/lib/src/constants/revive.dart
@@ -5,7 +5,6 @@
import 'package:analyzer/dart/constant/value.dart';
import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/dart/element/type.dart';
-
// ignore: implementation_imports
import 'package:analyzer/src/dart/constant/value.dart';
@@ -65,6 +64,7 @@
return !result.isPrivate;
}
+ // ignore: deprecated_member_use
for (final e in origin!.definingCompilationUnit.types
.expand((t) => t.fields)
.where((f) => f.isConst && f.computeConstantValue() == object)) {
diff --git a/source_gen/lib/src/generator.dart b/source_gen/lib/src/generator.dart
index 2b66ca0..f3e18eb 100644
--- a/source_gen/lib/src/generator.dart
+++ b/source_gen/lib/src/generator.dart
@@ -60,7 +60,9 @@
} catch (_) {
// Source for `element` wasn't found, it must be in a summary with no
// associated source. We can still give the name.
- buffer..writeln()..writeln('Cause: $element');
+ buffer
+ ..writeln()
+ ..writeln('Cause: $element');
}
}
diff --git a/source_gen/lib/src/library.dart b/source_gen/lib/src/library.dart
index c9832be..0d43362 100644
--- a/source_gen/lib/src/library.dart
+++ b/source_gen/lib/src/library.dart
@@ -34,18 +34,7 @@
}
/// All of the declarations in this library.
- Iterable<Element> get allElements sync* {
- for (var cu in element.units) {
- yield* cu.accessors;
- yield* cu.enums;
- yield* cu.typeAliases;
- yield* cu.functions;
- yield* cu.mixins;
- yield* cu.topLevelVariables;
- yield* cu.types;
- yield* cu.extensions;
- }
- }
+ Iterable<Element> get allElements => element.topLevelElements;
/// All of the declarations in this library annotated with [checker].
Iterable<AnnotatedElement> annotatedWith(TypeChecker checker,
@@ -162,6 +151,7 @@
}
/// All of the elements representing classes in this library.
+ // ignore: deprecated_member_use
Iterable<ClassElement> get classes => element.units.expand((cu) => cu.types);
/// All of the elements representing enums in this library.
diff --git a/source_gen/lib/src/utils.dart b/source_gen/lib/src/utils.dart
index bb60d9a..765494f 100644
--- a/source_gen/lib/src/utils.dart
+++ b/source_gen/lib/src/utils.dart
@@ -41,7 +41,10 @@
///
/// Returns `null` if [element] is missing identifier.
String nameOfPartial(LibraryElement element, AssetId source) {
+ // TODO(scheglov) Remove when switched to newer package:analyzer.
+ // ignore:unnecessary_non_null_assertion, unnecessary_null_comparison
if (element.name != null && element.name!.isNotEmpty) {
+ // ignore:unnecessary_non_null_assertion
return element.name!;
}
diff --git a/source_gen/mono_pkg.yaml b/source_gen/mono_pkg.yaml
index 8f0fb96..41eb9cc 100644
--- a/source_gen/mono_pkg.yaml
+++ b/source_gen/mono_pkg.yaml
@@ -6,11 +6,11 @@
stages:
- analyze_format:
- group:
- - dartfmt
- - dartanalyzer: --fatal-infos .
+ - format
+ - analyze: --fatal-infos .
dart: dev
- group:
- - dartanalyzer: .
+ - analyze
dart: 2.12.0
- unit_test:
- test
diff --git a/source_gen/pubspec.yaml b/source_gen/pubspec.yaml
index 184de57..c55f0f9 100644
--- a/source_gen/pubspec.yaml
+++ b/source_gen/pubspec.yaml
@@ -1,5 +1,5 @@
name: source_gen
-version: 1.0.2
+version: 1.0.3
description: >-
Source code generation builders and utilities for the Dart build system
repository: https://github.com/dart-lang/source_gen
@@ -8,7 +8,7 @@
sdk: ">=2.12.0 <3.0.0"
dependencies:
- analyzer: ^1.7.0
+ analyzer: '>=1.7.0 <3.0.0'
async: ^2.5.0
build: ^2.0.0
dart_style: ^2.0.0
diff --git a/webview_flutter/BUILD.gn b/webview_flutter/BUILD.gn
index 8055963..0c7a955 100644
--- a/webview_flutter/BUILD.gn
+++ b/webview_flutter/BUILD.gn
@@ -1,4 +1,4 @@
-# This file is generated by package_importer.py for webview_flutter-2.0.9
+# This file is generated by package_importer.py for webview_flutter-2.0.10
import("//build/dart/dart_library.gni")
diff --git a/webview_flutter/CHANGELOG.md b/webview_flutter/CHANGELOG.md
index f43812d..46f5e04 100644
--- a/webview_flutter/CHANGELOG.md
+++ b/webview_flutter/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 2.0.10
+
+* Fix keyboard issues link in the README.
+
## 2.0.9
* Add iOS UI integration test target.
diff --git a/webview_flutter/README.md b/webview_flutter/README.md
index 2bfc312..9a613f5 100644
--- a/webview_flutter/README.md
+++ b/webview_flutter/README.md
@@ -19,7 +19,7 @@
[Platform Views](https://flutter.dev/docs/development/platform-integration/platform-views) to embed
the Android’s webview within the Flutter app. By default a Virtual Display based platform view
backend is used, this implementation has multiple
-[keyboard](https://github.com/flutter/flutter/issues?q=is%3Aopen+label%3Avd-only+label%3A%22p%3A+webview-keyboard%22).
+[keyboard issues](https://github.com/flutter/flutter/issues?q=is%3Aopen+label%3Avd-only+label%3A%22p%3A+webview-keyboard%22).
When keyboard input is required we recommend using the Hybrid Composition based platform views
implementation. Note that on Android versions prior to Android 10 Hybrid Composition has some
[performance drawbacks](https://flutter.dev/docs/development/platform-integration/platform-views#performance).
diff --git a/webview_flutter/android/build.gradle b/webview_flutter/android/build.gradle
index 0ad39b7..45f769b 100644
--- a/webview_flutter/android/build.gradle
+++ b/webview_flutter/android/build.gradle
@@ -36,5 +36,6 @@
dependencies {
implementation 'androidx.annotation:annotation:1.0.0'
implementation 'androidx.webkit:webkit:1.0.0'
+ testImplementation 'junit:junit:4.12'
}
}
diff --git a/webview_flutter/android/src/main/java/io/flutter/plugins/webviewflutter/FlutterWebViewClient.java b/webview_flutter/android/src/main/java/io/flutter/plugins/webviewflutter/FlutterWebViewClient.java
index 148be95..4e7056f 100644
--- a/webview_flutter/android/src/main/java/io/flutter/plugins/webviewflutter/FlutterWebViewClient.java
+++ b/webview_flutter/android/src/main/java/io/flutter/plugins/webviewflutter/FlutterWebViewClient.java
@@ -36,7 +36,7 @@
this.methodChannel = methodChannel;
}
- private static String errorCodeToString(int errorCode) {
+ static String errorCodeToString(int errorCode) {
switch (errorCode) {
case WebViewClient.ERROR_AUTHENTICATION:
return "authentication";
diff --git a/webview_flutter/android/src/test/java/io/flutter/plugins/webviewflutter/WebViewTest.java b/webview_flutter/android/src/test/java/io/flutter/plugins/webviewflutter/WebViewTest.java
new file mode 100644
index 0000000..131a5a3
--- /dev/null
+++ b/webview_flutter/android/src/test/java/io/flutter/plugins/webviewflutter/WebViewTest.java
@@ -0,0 +1,49 @@
+// Copyright 2013 The Flutter Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package io.flutter.plugins.webviewflutter;
+
+import static org.junit.Assert.assertEquals;
+
+import android.webkit.WebViewClient;
+import org.junit.Test;
+
+public class WebViewTest {
+ @Test
+ public void errorCodes() {
+ assertEquals(
+ FlutterWebViewClient.errorCodeToString(WebViewClient.ERROR_AUTHENTICATION),
+ "authentication");
+ assertEquals(FlutterWebViewClient.errorCodeToString(WebViewClient.ERROR_BAD_URL), "badUrl");
+ assertEquals(FlutterWebViewClient.errorCodeToString(WebViewClient.ERROR_CONNECT), "connect");
+ assertEquals(
+ FlutterWebViewClient.errorCodeToString(WebViewClient.ERROR_FAILED_SSL_HANDSHAKE),
+ "failedSslHandshake");
+ assertEquals(FlutterWebViewClient.errorCodeToString(WebViewClient.ERROR_FILE), "file");
+ assertEquals(
+ FlutterWebViewClient.errorCodeToString(WebViewClient.ERROR_FILE_NOT_FOUND), "fileNotFound");
+ assertEquals(
+ FlutterWebViewClient.errorCodeToString(WebViewClient.ERROR_HOST_LOOKUP), "hostLookup");
+ assertEquals(FlutterWebViewClient.errorCodeToString(WebViewClient.ERROR_IO), "io");
+ assertEquals(
+ FlutterWebViewClient.errorCodeToString(WebViewClient.ERROR_PROXY_AUTHENTICATION),
+ "proxyAuthentication");
+ assertEquals(
+ FlutterWebViewClient.errorCodeToString(WebViewClient.ERROR_REDIRECT_LOOP), "redirectLoop");
+ assertEquals(FlutterWebViewClient.errorCodeToString(WebViewClient.ERROR_TIMEOUT), "timeout");
+ assertEquals(
+ FlutterWebViewClient.errorCodeToString(WebViewClient.ERROR_TOO_MANY_REQUESTS),
+ "tooManyRequests");
+ assertEquals(FlutterWebViewClient.errorCodeToString(WebViewClient.ERROR_UNKNOWN), "unknown");
+ assertEquals(
+ FlutterWebViewClient.errorCodeToString(WebViewClient.ERROR_UNSAFE_RESOURCE),
+ "unsafeResource");
+ assertEquals(
+ FlutterWebViewClient.errorCodeToString(WebViewClient.ERROR_UNSUPPORTED_AUTH_SCHEME),
+ "unsupportedAuthScheme");
+ assertEquals(
+ FlutterWebViewClient.errorCodeToString(WebViewClient.ERROR_UNSUPPORTED_SCHEME),
+ "unsupportedScheme");
+ }
+}
diff --git a/webview_flutter/pubspec.yaml b/webview_flutter/pubspec.yaml
index 6acee01..4d984be 100644
--- a/webview_flutter/pubspec.yaml
+++ b/webview_flutter/pubspec.yaml
@@ -2,7 +2,7 @@
description: A Flutter plugin that provides a WebView widget on Android and iOS.
repository: https://github.com/flutter/plugins/tree/master/packages/webview_flutter
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+webview%22
-version: 2.0.9
+version: 2.0.10
environment:
sdk: ">=2.12.0 <3.0.0"