updateBackground method
Update the background image.
backgroundImage - The new background image as PNG/JPEG bytes
Returns true if the background was updated successfully.
Implementation
Future<bool> updateBackground(Uint8List backgroundImage) async {
if (!isSupported || !_isEnabled) {
return false;
}
try {
final result = await _channel.invokeMethod<Map>('updateBackground', {
'imageBytes': backgroundImage,
});
final success = result?['success'] as bool? ?? false;
return success;
} catch (e) {
return false;
}
}