PackageFileResolver.fromJson constructor
Creates a resolver from a serialized JSON representation.
This factory method reconstructs a resolver from data previously saved with toJson.
@param data The JSON data to reconstruct from @return A new PackageFileResolver with the restored state
Implementation
factory PackageFileResolver.fromJson(Map<String, dynamic> data) {
final Map<String, String> packageToPath = (data['packageToPath'] as Map<dynamic, dynamic>).cast<String, String>();
return PackageFileResolverImpl(
packageToPath,
packagesHash: data['packagesHash'],
rootPackage: data['rootPackage'],
);
}