barCode method

Future<void> barCode({
  1. required String content,
  2. int x = 0,
  3. int y = 0,
  4. BarCodeType codeType = BarCodeType.c_128,
  5. Rotation rotation = Rotation.r_0,
  6. int height = 100,
  7. bool readable = true,
  8. int narrow = 2,
  9. int wide = 4,
})

Implementation

Future<void> barCode(
    {required String content,
    int x = 0,
    int y = 0,
    BarCodeType codeType = BarCodeType.c_128,
    Rotation rotation = Rotation.r_0,
    int height = 100,
    bool readable = true,
    int narrow = 2,
    int wide = 4}) async {
  Map<String, dynamic> params = {
    "content": content,
    "x": x,
    "y": y,
    "codeType": EnumTool.getCodeType(codeType),
    "rotation": EnumTool.getRotation(rotation),
    "height": height,
    "readable": readable,
    "narrow": narrow,
    "wide": wide,
  };
  await methodChannel.invokeMethod<void>('barCode', params);
}