RichBlock.mathematicalExpression constructor

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

A block with a mathematical expression in LaTeX format, corresponding to the custom HTML tag <tg-math-block>.

Implementation

const factory RichBlock.mathematicalExpression({
  /// Type of the block, always "mathematical_expression"
  @JsonKey(name: 'type')
  @Default(RichBlockType.mathematicalExpression)
  RichBlockType type,

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