Please check the following before submitting a new issue.
Please select affected platform(s)
Proposal
Dart 3.12 added the invalid_runtime_check_with_js_interop_types lint.
When adding the following analysis_options.yaml to permission_handler_html:
linter:
rules:
invalid_runtime_check_with_js_interop_types: true
flutter analyze outputs
> flutter analyze
Analyzing permission_handler_html...
info • Catch clause with type 'DOMException' checks whether the caught value is a JS interop type, which might not be platform-consistent. Remove the type in the catch clause and try using 'isA' from 'dart:js_interop' within the catch block to check if the value is a JS interop type •
lib/web_delegate.dart:94:10 • invalid_runtime_check_with_js_interop_types
info • Catch clause with type 'DOMException' checks whether the caught value is a JS interop type, which might not be platform-consistent. Remove the type in the catch clause and try using 'isA' from 'dart:js_interop' within the catch block to check if the value is a JS interop type •
lib/web_delegate.dart:124:10 • invalid_runtime_check_with_js_interop_types
2 issues found. (ran in 0.6s)
Pitch
Fixing this will satisfy the newly added lint.
Please check the following before submitting a new issue.
Please select affected platform(s)
Proposal
Dart 3.12 added the invalid_runtime_check_with_js_interop_types lint.
When adding the following
analysis_options.yamltopermission_handler_html:flutter analyzeoutputsPitch
Fixing this will satisfy the newly added lint.