Skip to content

dart:io import makes the package uncompilable for web #29

Open

Description

@developerjamiu
// lib/src/extensions/item_span_default_config.dart:1
import 'dart:io';

Used only for Platform.isAndroid / Platform.isIOS when choosing a maps URL. This file is reachable from the exported widgets, so any app that imports this package and targets web fails to compile, even though it never calls the plugin on web.

This also blocks adding web as a supported platform.

Fix: use defaultTargetPlatform from package:flutter/foundation.dart, which is web-safe and needs no conditional imports.

Found during the v0.4.0 codebase audit.

Activity

  1. added
    bug
    platform: dart
    on Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugplatform: dart

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions