RichText.mathematicalExpression constructor

const RichText.mathematicalExpression({
  1. @JsonKey.new(name: 'type') @Default.new(RichTextType.mathematicalExpression) RichTextType type,
  2. @JsonKey.new(name: 'expression') required String expression,
})

A mathematical expression.

Implementation

const factory RichText.mathematicalExpression({
  /// Type of the rich text, always "mathematical_expression"
  @JsonKey(name: 'type')
  @Default(RichTextType.mathematicalExpression)
  RichTextType type,

  /// The expression in LaTeX format
  @JsonKey(name: 'expression') required String expression,
}) = RichTextMathematicalExpression;