Printing 当我想在flatter中打印列时,它不会在列之间提供任何空格,如下图所示
Printing 当我想在flatter中打印列时,它不会在列之间提供任何空格,如下图所示,printing,flutter-dependencies,network-printers,Printing,Flutter Dependencies,Network Printers,import 'package:esc_pos_printer/esc_pos_printer.dart'; import 'package:esc_pos_utils/esc_pos_utils.dart'; printItem() async { const PaperSize paper = PaperSize.mm80; final profile = await CapabilityProfile.load(); final printer = NetworkPrint
import 'package:esc_pos_printer/esc_pos_printer.dart';
import 'package:esc_pos_utils/esc_pos_utils.dart';
printItem() async {
const PaperSize paper = PaperSize.mm80;
final profile = await CapabilityProfile.load();
final printer = NetworkPrinter(paper, profile, spaceBetweenRows: 30);
final PosPrintResult res =
await printer.connect('192.168.100.30', port: 9100);
if (res == PosPrintResult.success) {
printer.row([
PosColumn(
text: 'col3',
width: 3,
styles: PosStyles(align: PosAlign.center, underline: true),
),
PosColumn(
text: 'col6',
width: 6,
styles: PosStyles(align: PosAlign.center, underline: true),
),
PosColumn(
text: 'col3',
width: 3,
styles: PosStyles(align: PosAlign.center, underline: true),
),
]);
printer.row([
PosColumn(
text: 'col3',
width: 3,
styles: PosStyles(align: PosAlign.center, underline: true),
),
PosColumn(
text: 'col6',
width: 6,
styles: PosStyles(align: PosAlign.center, underline: true),
),
PosColumn(
text: 'col3',
width: 3,
styles: PosStyles(align: PosAlign.center, underline: true),
),
]);
printer.feed(2);
printer.cut();
printer.disconnect();
print('Print result: ${res.msg}');
}
}