fetch method
Fetches the specified asset pack from the platform.
This method triggers the platform's asset delivery mechanism to download the specified asset pack. It is particularly useful for on-demand resources.
assetPackName: The name of the asset pack to fetch.
Throws a PlatformException if fetching the asset pack fails.
Implementation
@override
Future<void> fetch(String assetPackName) async {
try {
await methodChannel.invokeMethod('fetch', {'assetPack': assetPackName});
} on PlatformException catch (e) {
debugPrint("Failed to fetch asset pack: ${e.message}");
rethrow; // Re-throw the error if higher-level handling is needed
}
}