marginTop method

  1. @override
double marginTop(
  1. bool drawText,
  2. double width,
  3. double height,
  4. double fontHeight,
  5. double textPadding,
)
override

Margin at the top of the barcode

Implementation

@override
double marginTop(
  bool drawText,
  double width,
  double height,
  double fontHeight,
  double textPadding,
) {
  if (!drawText || !drawIsbn) {
    return super.marginTop(drawText, width, height, fontHeight, textPadding);
  }

  return fontHeight + textPadding;
}