Apple returns structured address components, and the plugin throws all of them away, keeping one arbitrary value.
Available keys, from NSTextCheckingResult.h:
NSTextCheckingNameKey, NSTextCheckingJobTitleKey, NSTextCheckingOrganizationKey,
NSTextCheckingStreetKey, NSTextCheckingCityKey, NSTextCheckingStateKey,
NSTextCheckingZIPKey, NSTextCheckingCountryKey, NSTextCheckingPhoneKey
The same components dictionary carries NSTextCheckingAirlineKey and NSTextCheckingFlightKey for transit matches, so this lands naturally alongside flight support.
Proposed:
/// Structured detail for the span, where the platform provides it.
/// Populated on Apple platforms; null elsewhere.
final Map<String, String>? components;
Every other Flutter package highlights an address. None of them hand back a parsed one. This is a stronger claim to being the leading detection package than the type count is.
Depends on fixing the address rawValue issue first, which currently consumes this same dictionary incorrectly.
Found during the v0.4.0 codebase audit.
Apple returns structured address components, and the plugin throws all of them away, keeping one arbitrary value.
Available keys, from
NSTextCheckingResult.h:The same
componentsdictionary carriesNSTextCheckingAirlineKeyandNSTextCheckingFlightKeyfor transit matches, so this lands naturally alongside flight support.Proposed:
Every other Flutter package highlights an address. None of them hand back a parsed one. This is a stronger claim to being the leading detection package than the type count is.
Depends on fixing the address rawValue issue first, which currently consumes this same dictionary incorrectly.
Found during the v0.4.0 codebase audit.