[webview_flutter] Migrate webview_flutter_platform_interface to analysis_options.yaml (#4549)

diff --git a/packages/webview_flutter/webview_flutter_platform_interface/CHANGELOG.md b/packages/webview_flutter/webview_flutter_platform_interface/CHANGELOG.md
index efc43cf..4e506de 100644
--- a/packages/webview_flutter/webview_flutter_platform_interface/CHANGELOG.md
+++ b/packages/webview_flutter/webview_flutter_platform_interface/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 1.5.2
+
+* Mirgrates from analysis_options_legacy.yaml to the more strict analysis_options.yaml.
+
 ## 1.5.1
 
 * Reverts the addition of `onUrlChanged`, which was unintentionally a breaking
diff --git a/packages/webview_flutter/webview_flutter_platform_interface/analysis_options.yaml b/packages/webview_flutter/webview_flutter_platform_interface/analysis_options.yaml
deleted file mode 100644
index 5aeb4e7..0000000
--- a/packages/webview_flutter/webview_flutter_platform_interface/analysis_options.yaml
+++ /dev/null
@@ -1 +0,0 @@
-include: ../../../analysis_options_legacy.yaml
diff --git a/packages/webview_flutter/webview_flutter_platform_interface/lib/src/method_channel/webview_method_channel.dart b/packages/webview_flutter/webview_flutter_platform_interface/lib/src/method_channel/webview_method_channel.dart
index 8df9f4c..043b588 100644
--- a/packages/webview_flutter/webview_flutter_platform_interface/lib/src/method_channel/webview_method_channel.dart
+++ b/packages/webview_flutter/webview_flutter_platform_interface/lib/src/method_channel/webview_method_channel.dart
@@ -35,32 +35,34 @@
   Future<bool?> _onMethodCall(MethodCall call) async {
     switch (call.method) {
       case 'javascriptChannelMessage':
-        final String channel = call.arguments['channel']!;
-        final String message = call.arguments['message']!;
+        final String channel = call.arguments['channel']! as String;
+        final String message = call.arguments['message']! as String;
         _javascriptChannelRegistry.onJavascriptChannelMessage(channel, message);
         return true;
       case 'navigationRequest':
         return await _platformCallbacksHandler.onNavigationRequest(
-          url: call.arguments['url']!,
-          isForMainFrame: call.arguments['isForMainFrame']!,
+          url: call.arguments['url']! as String,
+          isForMainFrame: call.arguments['isForMainFrame']! as bool,
         );
       case 'onPageFinished':
-        _platformCallbacksHandler.onPageFinished(call.arguments['url']!);
+        _platformCallbacksHandler
+            .onPageFinished(call.arguments['url']! as String);
         return null;
       case 'onProgress':
-        _platformCallbacksHandler.onProgress(call.arguments['progress']);
+        _platformCallbacksHandler.onProgress(call.arguments['progress'] as int);
         return null;
       case 'onPageStarted':
-        _platformCallbacksHandler.onPageStarted(call.arguments['url']!);
+        _platformCallbacksHandler
+            .onPageStarted(call.arguments['url']! as String);
         return null;
       case 'onWebResourceError':
         _platformCallbacksHandler.onWebResourceError(
           WebResourceError(
-            errorCode: call.arguments['errorCode']!,
-            description: call.arguments['description']!,
+            errorCode: call.arguments['errorCode']! as int,
+            description: call.arguments['description']! as String,
             // iOS doesn't support `failingUrl`.
-            failingUrl: call.arguments['failingUrl'],
-            domain: call.arguments['domain'],
+            failingUrl: call.arguments['failingUrl'] as String?,
+            domain: call.arguments['domain'] as String?,
             errorType: call.arguments['errorType'] == null
                 ? null
                 : WebResourceErrorType.values.firstWhere(
@@ -122,23 +124,24 @@
 
   @override
   Future<bool> canGoBack() =>
-      _channel.invokeMethod<bool>("canGoBack").then((result) => result!);
+      _channel.invokeMethod<bool>('canGoBack').then((bool? result) => result!);
 
   @override
-  Future<bool> canGoForward() =>
-      _channel.invokeMethod<bool>("canGoForward").then((result) => result!);
+  Future<bool> canGoForward() => _channel
+      .invokeMethod<bool>('canGoForward')
+      .then((bool? result) => result!);
 
   @override
-  Future<void> goBack() => _channel.invokeMethod<void>("goBack");
+  Future<void> goBack() => _channel.invokeMethod<void>('goBack');
 
   @override
-  Future<void> goForward() => _channel.invokeMethod<void>("goForward");
+  Future<void> goForward() => _channel.invokeMethod<void>('goForward');
 
   @override
-  Future<void> reload() => _channel.invokeMethod<void>("reload");
+  Future<void> reload() => _channel.invokeMethod<void>('reload');
 
   @override
-  Future<void> clearCache() => _channel.invokeMethod<void>("clearCache");
+  Future<void> clearCache() => _channel.invokeMethod<void>('clearCache');
 
   @override
   Future<void> updateSettings(WebSettings settings) async {
@@ -152,7 +155,7 @@
   Future<String> evaluateJavascript(String javascript) {
     return _channel
         .invokeMethod<String>('evaluateJavascript', javascript)
-        .then((result) => result!);
+        .then((String? result) => result!);
   }
 
   @override
@@ -164,7 +167,7 @@
   Future<String> runJavascriptReturningResult(String javascript) {
     return _channel
         .invokeMethod<String>('runJavascriptReturningResult', javascript)
-        .then((result) => result!);
+        .then((String? result) => result!);
   }
 
   @override
@@ -180,7 +183,7 @@
   }
 
   @override
-  Future<String?> getTitle() => _channel.invokeMethod<String>("getTitle");
+  Future<String?> getTitle() => _channel.invokeMethod<String>('getTitle');
 
   @override
   Future<void> scrollTo(int x, int y) {
@@ -200,17 +203,17 @@
 
   @override
   Future<int> getScrollX() =>
-      _channel.invokeMethod<int>("getScrollX").then((result) => result!);
+      _channel.invokeMethod<int>('getScrollX').then((int? result) => result!);
 
   @override
   Future<int> getScrollY() =>
-      _channel.invokeMethod<int>("getScrollY").then((result) => result!);
+      _channel.invokeMethod<int>('getScrollY').then((int? result) => result!);
 
   /// Method channel implementation for [WebViewPlatform.clearCookies].
   static Future<bool> clearCookies() {
     return _cookieManagerChannel
         .invokeMethod<bool>('clearCookies')
-        .then<bool>((dynamic result) => result!);
+        .then<bool>((dynamic result) => result! as bool);
   }
 
   static Map<String, dynamic> _webSettingsToMap(WebSettings? settings) {
diff --git a/packages/webview_flutter/webview_flutter_platform_interface/lib/src/platform_interface/webview_platform.dart b/packages/webview_flutter/webview_flutter_platform_interface/lib/src/platform_interface/webview_platform.dart
index 4732f54..ca17cb6 100644
--- a/packages/webview_flutter/webview_flutter_platform_interface/lib/src/platform_interface/webview_platform.dart
+++ b/packages/webview_flutter/webview_flutter_platform_interface/lib/src/platform_interface/webview_platform.dart
@@ -61,6 +61,6 @@
   /// Returns true if cookies were present before clearing, else false.
   Future<bool> clearCookies() {
     throw UnimplementedError(
-        "WebView clearCookies is not implemented on the current platform");
+        'WebView clearCookies is not implemented on the current platform');
   }
 }
diff --git a/packages/webview_flutter/webview_flutter_platform_interface/lib/src/platform_interface/webview_platform_controller.dart b/packages/webview_flutter/webview_flutter_platform_interface/lib/src/platform_interface/webview_platform_controller.dart
index cfc8174..da73204 100644
--- a/packages/webview_flutter/webview_flutter_platform_interface/lib/src/platform_interface/webview_platform_controller.dart
+++ b/packages/webview_flutter/webview_flutter_platform_interface/lib/src/platform_interface/webview_platform_controller.dart
@@ -21,6 +21,9 @@
   /// Callbacks made by the WebView will be delegated to `handler`.
   ///
   /// The `handler` parameter must not be null.
+  // TODO(mvanbeusekom): Remove unused constructor parameter with the next
+  // breaking change (see issue https://github.com/flutter/flutter/issues/94292).
+  // ignore: avoid_unused_constructor_parameters
   WebViewPlatformController(WebViewPlatformCallbacksHandler handler);
 
   /// Loads the file located on the specified [absoluteFilePath].
@@ -34,7 +37,7 @@
     String absoluteFilePath,
   ) {
     throw UnimplementedError(
-        "WebView loadFlutterAsset is not implemented on the current platform");
+        'WebView loadFlutterAsset is not implemented on the current platform');
   }
 
   /// Loads the supplied HTML string.
@@ -46,7 +49,7 @@
     String? baseUrl,
   }) {
     throw UnimplementedError(
-        "WebView loadHtmlString is not implemented on the current platform");
+        'WebView loadHtmlString is not implemented on the current platform');
   }
 
   /// Loads the specified URL.
@@ -62,7 +65,7 @@
     Map<String, String>? headers,
   ) {
     throw UnimplementedError(
-        "WebView loadUrl is not implemented on the current platform");
+        'WebView loadUrl is not implemented on the current platform');
   }
 
   /// Makes a specific HTTP request ands loads the response in the webview.
@@ -81,7 +84,7 @@
     WebViewRequest request,
   ) {
     throw UnimplementedError(
-        "WebView loadRequest is not implemented on the current platform");
+        'WebView loadRequest is not implemented on the current platform');
   }
 
   /// Updates the webview settings.
@@ -90,7 +93,7 @@
   /// All null fields in `settings` are ignored.
   Future<void> updateSettings(WebSettings setting) {
     throw UnimplementedError(
-        "WebView updateSettings is not implemented on the current platform");
+        'WebView updateSettings is not implemented on the current platform');
   }
 
   /// Accessor to the current URL that the WebView is displaying.
@@ -98,19 +101,19 @@
   /// If no URL was ever loaded, returns `null`.
   Future<String?> currentUrl() {
     throw UnimplementedError(
-        "WebView currentUrl is not implemented on the current platform");
+        'WebView currentUrl is not implemented on the current platform');
   }
 
   /// Checks whether there's a back history item.
   Future<bool> canGoBack() {
     throw UnimplementedError(
-        "WebView canGoBack is not implemented on the current platform");
+        'WebView canGoBack is not implemented on the current platform');
   }
 
   /// Checks whether there's a forward history item.
   Future<bool> canGoForward() {
     throw UnimplementedError(
-        "WebView canGoForward is not implemented on the current platform");
+        'WebView canGoForward is not implemented on the current platform');
   }
 
   /// Goes back in the history of this WebView.
@@ -118,7 +121,7 @@
   /// If there is no back history item this is a no-op.
   Future<void> goBack() {
     throw UnimplementedError(
-        "WebView goBack is not implemented on the current platform");
+        'WebView goBack is not implemented on the current platform');
   }
 
   /// Goes forward in the history of this WebView.
@@ -126,13 +129,13 @@
   /// If there is no forward history item this is a no-op.
   Future<void> goForward() {
     throw UnimplementedError(
-        "WebView goForward is not implemented on the current platform");
+        'WebView goForward is not implemented on the current platform');
   }
 
   /// Reloads the current URL.
   Future<void> reload() {
     throw UnimplementedError(
-        "WebView reload is not implemented on the current platform");
+        'WebView reload is not implemented on the current platform');
   }
 
   /// Clears all caches used by the [WebView].
@@ -145,7 +148,7 @@
   ///	4. Local Storage.
   Future<void> clearCache() {
     throw UnimplementedError(
-        "WebView clearCache is not implemented on the current platform");
+        'WebView clearCache is not implemented on the current platform');
   }
 
   /// Evaluates a JavaScript expression in the context of the current page.
@@ -154,7 +157,7 @@
   /// evaluated expression is not supported (e.g on iOS not all non-primitive types can be evaluated).
   Future<String> evaluateJavascript(String javascript) {
     throw UnimplementedError(
-        "WebView evaluateJavascript is not implemented on the current platform");
+        'WebView evaluateJavascript is not implemented on the current platform');
   }
 
   /// Runs the given JavaScript in the context of the current page.
@@ -162,7 +165,7 @@
   /// The Future completes with an error if a JavaScript error occurred.
   Future<void> runJavascript(String javascript) {
     throw UnimplementedError(
-        "WebView runJavascript is not implemented on the current platform");
+        'WebView runJavascript is not implemented on the current platform');
   }
 
   /// Runs the given JavaScript in the context of the current page, and returns the result.
@@ -172,7 +175,7 @@
   /// certain non-primitive types on iOS, as well as `undefined` or `null` on iOS 14+.
   Future<String> runJavascriptReturningResult(String javascript) {
     throw UnimplementedError(
-        "WebView runJavascriptReturningResult is not implemented on the current platform");
+        'WebView runJavascriptReturningResult is not implemented on the current platform');
   }
 
   /// Adds new JavaScript channels to the set of enabled channels.
@@ -188,7 +191,7 @@
   /// See also: [CreationParams.javascriptChannelNames].
   Future<void> addJavascriptChannels(Set<String> javascriptChannelNames) {
     throw UnimplementedError(
-        "WebView addJavascriptChannels is not implemented on the current platform");
+        'WebView addJavascriptChannels is not implemented on the current platform');
   }
 
   /// Removes JavaScript channel names from the set of enabled channels.
@@ -197,13 +200,13 @@
   /// [CreationParams.javascriptChannelNames].
   Future<void> removeJavascriptChannels(Set<String> javascriptChannelNames) {
     throw UnimplementedError(
-        "WebView removeJavascriptChannels is not implemented on the current platform");
+        'WebView removeJavascriptChannels is not implemented on the current platform');
   }
 
   /// Returns the title of the currently loaded page.
   Future<String?> getTitle() {
     throw UnimplementedError(
-        "WebView getTitle is not implemented on the current platform");
+        'WebView getTitle is not implemented on the current platform');
   }
 
   /// Set the scrolled position of this view.
@@ -211,7 +214,7 @@
   /// The parameters `x` and `y` specify the position to scroll to in WebView pixels.
   Future<void> scrollTo(int x, int y) {
     throw UnimplementedError(
-        "WebView scrollTo is not implemented on the current platform");
+        'WebView scrollTo is not implemented on the current platform');
   }
 
   /// Move the scrolled position of this view.
@@ -219,7 +222,7 @@
   /// The parameters `x` and `y` specify the amount of WebView pixels to scroll by.
   Future<void> scrollBy(int x, int y) {
     throw UnimplementedError(
-        "WebView scrollBy is not implemented on the current platform");
+        'WebView scrollBy is not implemented on the current platform');
   }
 
   /// Return the horizontal scroll position of this view.
@@ -227,7 +230,7 @@
   /// Scroll position is measured from left.
   Future<int> getScrollX() {
     throw UnimplementedError(
-        "WebView getScrollX is not implemented on the current platform");
+        'WebView getScrollX is not implemented on the current platform');
   }
 
   /// Return the vertical scroll position of this view.
@@ -235,6 +238,6 @@
   /// Scroll position is measured from top.
   Future<int> getScrollY() {
     throw UnimplementedError(
-        "WebView getScrollY is not implemented on the current platform");
+        'WebView getScrollY is not implemented on the current platform');
   }
 }
diff --git a/packages/webview_flutter/webview_flutter_platform_interface/lib/src/types/creation_params.dart b/packages/webview_flutter/webview_flutter_platform_interface/lib/src/types/creation_params.dart
index f213e97..e69f510 100644
--- a/packages/webview_flutter/webview_flutter_platform_interface/lib/src/types/creation_params.dart
+++ b/packages/webview_flutter/webview_flutter_platform_interface/lib/src/types/creation_params.dart
@@ -55,6 +55,6 @@
 
   @override
   String toString() {
-    return '$runtimeType(initialUrl: $initialUrl, settings: $webSettings, javascriptChannelNames: $javascriptChannelNames, UserAgent: $userAgent)';
+    return 'CreationParams(initialUrl: $initialUrl, settings: $webSettings, javascriptChannelNames: $javascriptChannelNames, UserAgent: $userAgent)';
   }
 }
diff --git a/packages/webview_flutter/webview_flutter_platform_interface/lib/src/types/javascript_channel.dart b/packages/webview_flutter/webview_flutter_platform_interface/lib/src/types/javascript_channel.dart
index f32a418..e68cc2e 100644
--- a/packages/webview_flutter/webview_flutter_platform_interface/lib/src/types/javascript_channel.dart
+++ b/packages/webview_flutter/webview_flutter_platform_interface/lib/src/types/javascript_channel.dart
@@ -5,9 +5,9 @@
 import 'javascript_message.dart';
 
 /// Callback type for handling messages sent from JavaScript running in a web view.
-typedef void JavascriptMessageHandler(JavascriptMessage message);
+typedef JavascriptMessageHandler = void Function(JavascriptMessage message);
 
-final RegExp _validChannelNames = RegExp('^[a-zA-Z_][a-zA-Z0-9_]*\$');
+final RegExp _validChannelNames = RegExp(r'^[a-zA-Z_][a-zA-Z0-9_]*$');
 
 /// A named channel for receiving messaged from JavaScript code running inside a web view.
 class JavascriptChannel {
diff --git a/packages/webview_flutter/webview_flutter_platform_interface/lib/src/types/web_settings.dart b/packages/webview_flutter/webview_flutter_platform_interface/lib/src/types/web_settings.dart
index 3d94153..57c0a48 100644
--- a/packages/webview_flutter/webview_flutter_platform_interface/lib/src/types/web_settings.dart
+++ b/packages/webview_flutter/webview_flutter_platform_interface/lib/src/types/web_settings.dart
@@ -7,20 +7,21 @@
 import 'javascript_mode.dart';
 
 /// A single setting for configuring a WebViewPlatform which may be absent.
+@immutable
 class WebSetting<T> {
   /// Constructs an absent setting instance.
   ///
   /// The [isPresent] field for the instance will be false.
   ///
   /// Accessing [value] for an absent instance will throw.
-  WebSetting.absent()
+  const WebSetting.absent()
       : _value = null,
         isPresent = false;
 
   /// Constructs a setting of the given `value`.
   ///
   /// The [isPresent] field for the instance will be true.
-  WebSetting.of(T value)
+  const WebSetting.of(T value)
       : _value = value,
         isPresent = true;
 
@@ -51,9 +52,13 @@
 
   @override
   bool operator ==(Object other) {
-    if (other.runtimeType != runtimeType) return false;
-    final WebSetting<T> typedOther = other as WebSetting<T>;
-    return typedOther.isPresent == isPresent && typedOther._value == _value;
+    if (other.runtimeType != runtimeType) {
+      return false;
+    }
+
+    return other is WebSetting<T> &&
+        other.isPresent == isPresent &&
+        other._value == _value;
   }
 
   @override
diff --git a/packages/webview_flutter/webview_flutter_platform_interface/lib/src/types/webview_request.dart b/packages/webview_flutter/webview_flutter_platform_interface/lib/src/types/webview_request.dart
index 5e520f1..940e3a2 100644
--- a/packages/webview_flutter/webview_flutter_platform_interface/lib/src/types/webview_request.dart
+++ b/packages/webview_flutter/webview_flutter_platform_interface/lib/src/types/webview_request.dart
@@ -32,7 +32,7 @@
   WebViewRequest({
     required this.uri,
     required this.method,
-    this.headers = const {},
+    this.headers = const <String, String>{},
     this.body,
   });
 
@@ -49,10 +49,10 @@
   final Uint8List? body;
 
   /// Serializes the [WebViewRequest] to JSON.
-  Map<String, dynamic> toJson() => {
-        'uri': this.uri.toString(),
-        'method': this.method.serialize(),
-        'headers': this.headers,
-        'body': this.body,
+  Map<String, dynamic> toJson() => <String, dynamic>{
+        'uri': uri.toString(),
+        'method': method.serialize(),
+        'headers': headers,
+        'body': body,
       };
 }
diff --git a/packages/webview_flutter/webview_flutter_platform_interface/lib/webview_flutter_platform_interface.dart b/packages/webview_flutter/webview_flutter_platform_interface/lib/webview_flutter_platform_interface.dart
index b508989..aa41c82 100644
--- a/packages/webview_flutter/webview_flutter_platform_interface/lib/webview_flutter_platform_interface.dart
+++ b/packages/webview_flutter/webview_flutter_platform_interface/lib/webview_flutter_platform_interface.dart
@@ -2,6 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+export 'src/method_channel/webview_method_channel.dart';
 export 'src/platform_interface/platform_interface.dart';
 export 'src/types/types.dart';
-export 'src/method_channel/webview_method_channel.dart';
diff --git a/packages/webview_flutter/webview_flutter_platform_interface/pubspec.yaml b/packages/webview_flutter/webview_flutter_platform_interface/pubspec.yaml
index 33eb77c..318fea6 100644
--- a/packages/webview_flutter/webview_flutter_platform_interface/pubspec.yaml
+++ b/packages/webview_flutter/webview_flutter_platform_interface/pubspec.yaml
@@ -4,7 +4,7 @@
 issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+webview_flutter%22
 # NOTE: We strongly prefer non-breaking changes, even at the expense of a
 # less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
-version: 1.5.1
+version: 1.5.2
 
 environment:
   sdk: ">=2.12.0 <3.0.0"
diff --git a/packages/webview_flutter/webview_flutter_platform_interface/test/src/method_channel/webview_method_channel_test.dart b/packages/webview_flutter/webview_flutter_platform_interface/test/src/method_channel/webview_method_channel_test.dart
index 3960135..2db2dfa 100644
--- a/packages/webview_flutter/webview_flutter_platform_interface/test/src/method_channel/webview_method_channel_test.dart
+++ b/packages/webview_flutter/webview_flutter_platform_interface/test/src/method_channel/webview_method_channel_test.dart
@@ -170,10 +170,10 @@
           isMethodCall(
             'loadRequest',
             arguments: <String, dynamic>{
-              'request': {
+              'request': <String, dynamic>{
                 'uri': 'https://test.url',
                 'method': 'get',
-                'headers': {},
+                'headers': <String, String>{},
                 'body': null,
               }
             },
@@ -186,7 +186,7 @@
       await webViewPlatform.loadRequest(WebViewRequest(
         uri: Uri.parse('https://test.url'),
         method: WebViewRequestMethod.get,
-        headers: {'foo': 'bar'},
+        headers: <String, String>{'foo': 'bar'},
         body: Uint8List.fromList('hello world'.codeUnits),
       ));
 
@@ -196,10 +196,10 @@
           isMethodCall(
             'loadRequest',
             arguments: <String, dynamic>{
-              'request': {
+              'request': <String, dynamic>{
                 'uri': 'https://test.url',
                 'method': 'get',
-                'headers': {'foo': 'bar'},
+                'headers': <String, String>{'foo': 'bar'},
                 'body': 'hello world'.codeUnits,
               }
             },
@@ -311,7 +311,7 @@
 
     test('updateSettings', () async {
       final WebSettings settings =
-          WebSettings(userAgent: WebSetting<String?>.of('Dart Test'));
+          WebSettings(userAgent: const WebSetting<String?>.of('Dart Test'));
       await webViewPlatform.updateSettings(settings);
 
       expect(
@@ -329,7 +329,7 @@
 
     test('updateSettings all parameters', () async {
       final WebSettings settings = WebSettings(
-        userAgent: WebSetting<String?>.of('Dart Test'),
+        userAgent: const WebSetting<String?>.of('Dart Test'),
         javascriptMode: JavascriptMode.disabled,
         hasNavigationDelegate: true,
         hasProgressTracking: true,
@@ -362,7 +362,7 @@
 
     test('updateSettings without settings', () async {
       final WebSettings settings =
-          WebSettings(userAgent: WebSetting<String?>.absent());
+          WebSettings(userAgent: const WebSetting<String?>.absent());
       await webViewPlatform.updateSettings(settings);
 
       expect(
diff --git a/packages/webview_flutter/webview_flutter_platform_interface/test/src/platform_interface/javascript_channel_registry_test.dart b/packages/webview_flutter/webview_flutter_platform_interface/test/src/platform_interface/javascript_channel_registry_test.dart
index 55d0e1e..df1b530 100644
--- a/packages/webview_flutter/webview_flutter_platform_interface/test/src/platform_interface/javascript_channel_registry_test.dart
+++ b/packages/webview_flutter/webview_flutter_platform_interface/test/src/platform_interface/javascript_channel_registry_test.dart
@@ -3,9 +3,9 @@
 // found in the LICENSE file.
 
 import 'package:flutter_test/flutter_test.dart';
+import 'package:webview_flutter_platform_interface/src/platform_interface/javascript_channel_registry.dart';
 import 'package:webview_flutter_platform_interface/src/types/javascript_channel.dart';
 import 'package:webview_flutter_platform_interface/src/types/types.dart';
-import 'package:webview_flutter_platform_interface/src/platform_interface/javascript_channel_registry.dart';
 
 void main() {
   final Map<String, String> _log = <String, String>{};
diff --git a/packages/webview_flutter/webview_flutter_platform_interface/test/src/types/webview_request_test.dart b/packages/webview_flutter/webview_flutter_platform_interface/test/src/types/webview_request_test.dart
index 5d2b568..6e1a4d7 100644
--- a/packages/webview_flutter/webview_flutter_platform_interface/test/src/types/webview_request_test.dart
+++ b/packages/webview_flutter/webview_flutter_platform_interface/test/src/types/webview_request_test.dart
@@ -23,17 +23,17 @@
     serializedRequest = request.toJson();
     expect(serializedRequest['uri'], 'https://flutter.dev');
     expect(serializedRequest['method'], 'get');
-    expect(serializedRequest['headers'], {});
+    expect(serializedRequest['headers'], <String, String>{});
     expect(serializedRequest['body'], null);
     // Test serialization of headers and body
     request = WebViewRequest(
       uri: Uri.parse('https://flutter.dev'),
       method: WebViewRequestMethod.get,
-      headers: {'foo': 'bar'},
+      headers: <String, String>{'foo': 'bar'},
       body: Uint8List.fromList('Example Body'.codeUnits),
     );
     serializedRequest = request.toJson();
-    expect(serializedRequest['headers'], {'foo': 'bar'});
+    expect(serializedRequest['headers'], <String, String>{'foo': 'bar'});
     expect(serializedRequest['body'], 'Example Body'.codeUnits);
   });
 }
diff --git a/script/configs/custom_analysis.yaml b/script/configs/custom_analysis.yaml
index 758157d..b3823da 100644
--- a/script/configs/custom_analysis.yaml
+++ b/script/configs/custom_analysis.yaml
@@ -25,7 +25,6 @@
 - url_launcher
 - video_player
 - webview_flutter/webview_flutter
-- webview_flutter/webview_flutter_platform_interface
 
 # These plugins are deprecated in favor of the Community Plus versions, and
 # will be removed from the repo once the critical support window has passed,