-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
Description
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
Assignees
Labels
Type
Projects
Status
Triage