Goal: go from two supported platforms to six, in one package, without federating.
Verified shape, matching what package_info_plus ships today:
| Platform |
Mechanism |
Work |
| iOS |
existing pluginClass |
none |
| Android |
existing pluginClass |
none |
| macOS |
pluginClass + sharedDarwinSource: true |
reuses the iOS Swift, no second copy |
| Windows |
dartPluginClass |
shares one Dart implementation |
| Linux |
dartPluginClass |
shares one Dart implementation |
| Web |
pluginClass + fileName |
shares the same Dart implementation |
Two implementations get from two platforms to six: the Darwin source already written, plus one Dart detector serving Windows, Linux and web.
macOS is close to free. Checked against MacOSX26.5.sdk: NSDataDetector and every checking type the plugin uses are available with the same availability as iOS, and a grep for UIKit symbols across all three Swift files returns nothing, so the classification code is pure Foundation. The work is renaming ios/ to darwin/, a podspec per platform, example/macos/, and the conditional FlutterMacOS import.
Windows, Linux and web have no system entity detector. A Dart implementation caps them at URLs, emails and phone numbers, plus the Dart-side types (hashtag, mention, custom).
Blocked by the platform instance caching issue, since Dart-only platforms register by assigning SmartTextFlutterPlatform.instance.
Also depends on removing the dart:io import for web.
README wording: "macOS full parity; Windows, Linux and web detect links, emails and phone numbers only." Do not advertise flat "desktop support" while address and date are missing on two of the three desktops.
Found during the v0.4.0 codebase audit.
Goal: go from two supported platforms to six, in one package, without federating.
Verified shape, matching what
package_info_plusships today:pluginClasspluginClasspluginClass+sharedDarwinSource: truedartPluginClassdartPluginClasspluginClass+fileNameTwo implementations get from two platforms to six: the Darwin source already written, plus one Dart detector serving Windows, Linux and web.
macOS is close to free. Checked against
MacOSX26.5.sdk:NSDataDetectorand every checking type the plugin uses are available with the same availability as iOS, and a grep for UIKit symbols across all three Swift files returns nothing, so the classification code is pure Foundation. The work is renamingios/todarwin/, a podspec per platform,example/macos/, and the conditionalFlutterMacOSimport.Windows, Linux and web have no system entity detector. A Dart implementation caps them at URLs, emails and phone numbers, plus the Dart-side types (hashtag, mention, custom).
Blocked by the platform instance caching issue, since Dart-only platforms register by assigning
SmartTextFlutterPlatform.instance.Also depends on removing the
dart:ioimport for web.README wording: "macOS full parity; Windows, Linux and web detect links, emails and phone numbers only." Do not advertise flat "desktop support" while address and date are missing on two of the three desktops.
Found during the v0.4.0 codebase audit.