StoneContentprint constructor
StoneContentprint({
- required StonePrintType type,
- String? content,
- StonePrintAlign? align,
- StonePrintSize? size,
- String? imagePath,
- bool ignoreLineBreak = false,
Implementation
StoneContentprint({required this.type, this.content, this.align, this.size, this.imagePath, this.ignoreLineBreak = false})
: assert(
type != StonePrintType.text || (content is String && align is StonePrintAlign && size is StonePrintSize),
"content, align, and size must be defined when type is text",
),
assert(
type != StonePrintType.image || imagePath is String,
"imagePath cannot be null when type is image",
),
assert(
type != StonePrintType.line || content is String,
"content cannot be null when type is line",
);