getDrawableData method
NATIVE MEDIA METHODS ********************************************* Decodes a native drawable resource into a Uint8List that can be used by Flutter widgets.
The drawablePath
parameter is a String that represents the path to the
drawable resource.
This method returns a Future that resolves to a Uint8List containing the
decoded data, or null
if an error occurred.
This method is typically used to load native drawable resources, such as notification icons and images, and convert them into a format that can be used by Flutter widgets. The decoded data can then be used to create a MemoryImage, which can be used as the image source for a CircleAvatar, Image, or other widget that accepts an ImageProvider.
Implementation
@override
Future<Uint8List?> getDrawableData(String drawablePath) async {
var result2 = await methodChannel.invokeMethod(
CHANNEL_METHOD_GET_DRAWABLE_DATA, drawablePath);
if (result2 == null) return null;
return result2;
}