renderText method

  1. @override
Future<void> renderText(
  1. String text,
  2. TextStyle style
)
override

在画布上绘制文本内容.

Implementation

@override
Future<void> renderText(String text, TextStyle style) async {
  _methodChannel.invokeMethod(Constants.METHOD_CANVAS_RENDER_TEXT, {
    ParamConstants.TEXT: text,
    ParamConstants.STYLE: jsonEncode(style.toJson())
  });
}