Skip to content

Expand to nine span types plus custom detectors #47

Description

@developerjamiu

Expand from five span types to nine plus custom detectors. All availability below was verified against the platform headers, not from memory.

Type Apple Android Dart (web, Windows, Linux)
url, email, phone yes yes yes
address yes, with components yes no
date, datetime yes yes, after the TYPE_DATE fix no
flight yes, NSTextCheckingTypeTransitInformation with Airline and Flight keys yes, TYPE_FLIGHT_NUMBER no
hashtag, mention Dart Dart yes
custom regex Dart Dart yes

Nine named types against linkify's four.

hashtag and mention are pure Dart, work on every platform, cost almost nothing, and are the most common reason someone reaches for linkify instead of this package today.

Not included: TYPE_OTP. Android declares it @FlaggedApi(FLAG_TEXT_CLASSIFIER_CHOICE_API_ENABLED), so it sits behind a runtime feature flag and cannot be relied on. Revisit when the flag graduates.

Blocked by the config API issue, since each new type currently costs another constructor parameter.

Found during the v0.4.0 codebase audit.

Activity

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

    apiPublic API shapeenhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions