setStyle method

  1. @override
Future<String> setStyle(
  1. PrintStyle printStyle
)
override

Implementation

@override
Future<String> setStyle(PrintStyle printStyle) async {
  try {
    return await methodChannel.invokeMethod<String>('setStyle', {
          'textAlign': printStyle.textAlign.value,
          'textSize': printStyle.textSize,
          'fontStyle': printStyle.fontStyle.value,
        }) ??
        'invalid';
  } on MissingPluginException catch (_) {
    throw MissingPluginException('No method found for setStyle() on channel');
  }
}