StoneContentprint constructor

StoneContentprint({
  1. required StonePrintType type,
  2. String? content,
  3. StonePrintAlign? align,
  4. StonePrintSize? size,
  5. String? imagePath,
  6. 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",
      );