BlockQuoteStyle class

How a blockquote is drawn.

Every field is optional. An unset field falls back to the theme's value, then to a default derived from the ambient ColorScheme — so setting one field changes one thing and leaves the rest alone:

GptMarkdown(
  text,
  styleSheet: const GptMarkdownStyleSheet(
    blockQuote: BlockQuoteStyle(barWidth: 4),
  ),
)

Set it on GptMarkdownThemeData instead to restyle every blockquote in the app. A value on the widget wins over the theme per field, not per object, so a widget that sets only barWidth keeps the theme's barColor.

Annotations

Constructors

BlockQuoteStyle({double? barWidth, Color? barColor, Radius? barRadius, Color? backgroundColor, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, TextStyle? textStyle})
Creates a blockquote style. Null fields defer to the theme, then to the resolved default.
const

Properties

backgroundColor → Color?
Fill behind the quote. Defaults to none.
final
barColor → Color?
Colour of the bar. Defaults to ColorScheme.onSurfaceVariant.
final
barRadius → Radius?
Rounding of the bar. Defaults to square corners.
final
barWidth → double?
Thickness of the bar down the side. Defaults to 3.
final
hashCode → int
The hash code for this object.
no setteroverride
margin → EdgeInsetsGeometry?
Space around the whole quote. Defaults to vertical: 2.
final
padding → EdgeInsetsGeometry?
Space between the bar and the quoted content. Defaults to start: 8.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
textStyle → TextStyle?
Applied on top of the surrounding text style. Defaults to no change.
final

Methods

copyWith({double? barWidth, Color? barColor, Radius? barRadius, Color? backgroundColor, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, TextStyle? textStyle}) → BlockQuoteStyle
A copy with the given fields replaced.
merge(BlockQuoteStyle? other) → BlockQuoteStyle
This style, with any unset field taken from other.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolve(ColorScheme scheme) → BlockQuoteStyle
This style with every remaining null filled in.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Methods

lerp(BlockQuoteStyle? a, BlockQuoteStyle? b, double t) → BlockQuoteStyle?
Linearly interpolates between two blockquote styles.