addImage method

  1. @override
Future<void> addImage(
  1. String name,
  2. Uint8List bytes, [
  3. bool sdf = false
])
override

Implementation

@override
Future<void> addImage(String name, Uint8List bytes,
    [bool sdf = false]) async {
  try {
    return await _channel.invokeMethod('style#addImage', <String, Object>{
      'name': name,
      'bytes': bytes,
      'length': bytes.length,
      'sdf': sdf
    });
  } on PlatformException catch (e) {
    return new Future.error(e);
  }
}