rowLabelCustom method

void rowLabelCustom(
  1. String label,
  2. String value, {
  3. int labelWidth = 20,
  4. FontSize size = FontSize.normal,
  5. bool bold = false,
})

Smart row dengan alignment untuk tanda ":" dengan custom width

Sama seperti rowLabel() tapi dengan kontrol width untuk label

Implementation

void rowLabelCustom(
  String label,
  String value, {
  int labelWidth = 20,
  FontSize size = FontSize.normal,
  bool bold = false,
}) {
  final paddedLabel = label.length <= labelWidth
      ? label.padRight(labelWidth)
      : label;

  final fullText = '$paddedLabel : $value';

  text(fullText, size: size, bold: bold, center: false);
}