Warn if certain APIs are being used in a way that produce different results on VM and Web builds #58320
Labels
analyzer-linter
Issues with the analyzer's support for the linter package
area-devexp
Developer Experience related issues (DevTools, IDEs, Analysis Server, completions, refactoring, etc)
linter-lint-request
P3
A lower priority bug or feature request
type-enhancement
A request for a change that isn't a bug
Linter rationale and background
Flutter makes cross platform development between VM and Web mainstream. Developers are thus more likely to run across APIs that while they work and are available on both platforms, might in some use-cases produce different results due to underlying implementation differences.
A linter rule that can detect usage of such APIs and use cases, and warn about the risk or issue, can help to avoid such errors and time consuming debugging.
Flutter code that was originally written to only consider VM builds, might later when built for Web as well, inadvertently use such APIs in such ways without the original use case being aware of the limitations in the Web platform. Such errors can be difficult to debug and find in the built Flutter web application.
Rule scope
The rule scope is general purpose for cross platform builds, but certainly driven by Flutter making it mainstream.
Example
An example of a case that occurred due to API's underlying implementation details differences in VM and Web was posted in this issue: #44876
The text was updated successfully, but these errors were encountered: