EditorText constructor

const EditorText({
  1. required String text,
  2. required Offset offset,
  3. int fontSizePx = 14,
  4. Color textColor = Colors.black,
  5. String fontName = '',
  6. TextAlign textAlign = TextAlign.left,
})

Implementation

const EditorText({
  required this.text,
  required this.offset,
  this.fontSizePx = 14,
  this.textColor = Colors.black,
  this.fontName = '',
  this.textAlign = TextAlign.left,
})  : assert(fontSizePx > 0, 'fontSizePx must be greater than 0'),
      assert(
        textAlign == TextAlign.left ||
            textAlign == TextAlign.center ||
            textAlign == TextAlign.right,
        'textAlign must be left, center or right',
      );