getDrawableData abstract method

Future<Uint8List?> getDrawableData(
  1. String drawablePath
)

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

/// 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].
Future<Uint8List?> getDrawableData(String drawablePath);