addLeftRightText method
void
addLeftRightText(
- String leftText,
- String rightText, {
- ReceiptTextStyleType leftStyle = ReceiptTextStyleType.normal,
- ReceiptTextStyleType rightStyle = ReceiptTextStyleType.normal,
- ReceiptTextSizeType leftSize = ReceiptTextSizeType.medium,
- ReceiptTextSizeType rightSize = ReceiptTextSizeType.medium,
Handler tag of text (span or b) and put inside body html
This will generate left right text with two value input from parameter
leftText
and rightText
Implementation
void addLeftRightText(
String leftText,
String rightText, {
ReceiptTextStyleType leftStyle = ReceiptTextStyleType.normal,
ReceiptTextStyleType rightStyle = ReceiptTextStyleType.normal,
ReceiptTextSizeType leftSize = ReceiptTextSizeType.medium,
ReceiptTextSizeType rightSize = ReceiptTextSizeType.medium,
}) {
final ReceiptTextLeftRight leftRightText = ReceiptTextLeftRight(
leftText,
rightText,
leftTextStyle: ReceiptTextStyle(
type: leftStyle,
useSpan: true,
size: leftSize,
),
rightTextStyle: ReceiptTextStyle(
type: leftStyle,
useSpan: true,
size: rightSize,
),
);
_data += leftRightText.html;
}