fetchPackageInfo method
The latest version's version string, publish date and (per plugin
platform) declared platform entry, from GET /api/packages/<name>.
Federated plugins (SPEC review finding on e1-s2): an app-facing package
like url_launcher declares its actual per-platform implementation
package at pubspec.flutter.plugin.platforms.<platform>.default_package
— that's the package whose archive carries the platform-specific files
(Package.swift, .so, Gradle) a plugin's own archive won't have.
Implementation
Future<PackageInfo> fetchPackageInfo(String packageName) async {
final uri = _baseUri.resolve('/api/packages/$packageName');
final body = await _getJson(uri);
final latest = body['latest'] as Map<String, dynamic>;
return _packageInfoFromVersionJson(latest);
}