Skip to content

Unsupported operation Web for ouds_accessibility_plugin #559

@AhmedAmineZr

Description

@AhmedAmineZr

Description

The current implementation uses Platform from the dart:io library to perform platform-specific checks or operations. However, this causes an error when running the application on the web:

Unsupported operation: Platform._operatingSystem

Cause:

  • dart:io is incompatible with web.
  • Using Platform directly in shared code leads to runtime errors on web.

To resolve

  • Replace the import of dart:io with the universal_io package, which provides a cross-platform implementation of dart:io APIs, including Platform.
  • Update the code to import from package:universal_io/io.dart instead of dart:io.
  • Optionally, add conditional imports or platform checks to ensure platform-specific code executes only on supported platforms.

Metadata

Metadata

Projects

Status

Triage

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions