Skip to content

Errors are reported as empty successes on both sides of the channel #35

Open

Description

@developerjamiu

Failures are reported as empty successes on both sides of the channel.

// android/.../SmartTextFlutterPlugin.kt:41-43
} catch (e: Throwable) {
    result.success(itemSpans)   // itemSpans is still the empty list
}
// lib/src/smart_text_flutter.dart:143-145
} catch (ex) {
    return const [];
}

Between them, every failure mode (OS quirk, malformed input, a genuine bug in this plugin) surfaces to the app as "no links found", with nothing logged anywhere.

This is why a defect here is very hard for a user to report usefully, and it is worth fixing before the other bug reports start arriving.

Fix: result.error(...) on Android. On the Dart side, let PlatformException propagate, or at minimum log it in debug builds before returning empty.

Found during the v0.4.0 codebase audit.

Activity

  1. added
    bug
    api
    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

    apibug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions