You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add a capabilities API and never silently drop a requested type #48
Support varies by platform and by OS version, so it cannot be a compile-time constant or a table in the README. Today the plugin silently returns fewer spans, which is why "DateTime is not supported on Android" lives in prose.
Keep the surface to one getter:
Set<ItemSpanType> get supportedTypes;
And one hard rule:
Requesting a type the current platform cannot detect throws UnsupportedError naming the type. Not a silent drop, not a logged warning.
// on WindowsawaitSmartTextFlutter.classifyText(text, types: {ItemSpanType.address});
// throws UnsupportedError: ItemSpanType.address is not supported on this platform.// Supported: url, email, phone, hashtag, mention
Callers that want graceful degradation intersect with supportedTypes first. Callers that pass nothing keep today's behaviour of detecting everything available.
This is what turns "as many platforms as possible" from a compromise into a feature: the package never pretends.
Activity