bluetooth_print
bluetooth_print copied to clipboard
Correctly implement mapToEscCommand for type text (iOS)
Fixes #24 Fixes #31
To achieve the above results, use the following and will work on both Android and iOS:
List<LineText> list = [];
list.add(LineText(type: LineText.TYPE_TEXT, linefeed: 1, weight: 1, width: 1, height: 1, underline: 1, content: 'ANDROID'));
list.add(LineText(type: LineText.TYPE_TEXT, linefeed: 1, content: ''));
list.add(LineText(type: LineText.TYPE_TEXT, linefeed: 1, weight: 0, width: 0, height: 0, underline: 0, content: 'normal'));
list.add(LineText(type: LineText.TYPE_TEXT, linefeed: 1, weight: 1, width: 0, height: 0, underline: 0, content: 'bold'));
list.add(LineText(type: LineText.TYPE_TEXT, linefeed: 1, weight: 0, width: 0, height: 0, underline: 1, content: 'underline'));
list.add(LineText(type: LineText.TYPE_TEXT, linefeed: 1, weight: 1, width: 0, height: 0, underline: 1, content: 'bold underline'));
list.add(LineText(type: LineText.TYPE_TEXT, linefeed: 1, weight: 0, width: 0, height: 1, underline: 0, content: 'tall'));
list.add(LineText(type: LineText.TYPE_TEXT, linefeed: 1, weight: 0, width: 1, height: 0, underline: 0, content: 'wide'));
list.add(LineText(type: LineText.TYPE_TEXT, linefeed: 1, weight: 0, width: 1, height: 1, underline: 0, content: 'tall wide'));
list.add(LineText(type: LineText.TYPE_TEXT, linefeed: 1, weight: 1, width: 1, height: 1, underline: 1, content: 'everything!'));