lerp static method
Linearly interpolates between two style sheets.
Implementation
static GptMarkdownStyleSheet? lerp(
GptMarkdownStyleSheet? a,
GptMarkdownStyleSheet? b,
double t,
) {
if (a == null && b == null) {
return null;
}
return GptMarkdownStyleSheet(
blockQuote: BlockQuoteStyle.lerp(a?.blockQuote, b?.blockQuote, t),
heading: HeadingStyle.lerp(a?.heading, b?.heading, t),
link: LinkStyle.lerp(a?.link, b?.link, t),
inlineCode: InlineCodeStyle.lerp(a?.inlineCode, b?.inlineCode, t),
list: ListStyle.lerp(a?.list, b?.list, t),
checkbox: CheckboxStyle.lerp(a?.checkbox, b?.checkbox, t),
codeBlock: CodeBlockStyle.lerp(a?.codeBlock, b?.codeBlock, t),
table: TableStyle.lerp(a?.table, b?.table, t),
image: ImageStyle.lerp(a?.image, b?.image, t),
hr: HrStyle.lerp(a?.hr, b?.hr, t),
sourceTag: SourceTagStyle.lerp(a?.sourceTag, b?.sourceTag, t),
latex: LatexStyle.lerp(a?.latex, b?.latex, t),
alert: AlertStyle.lerp(a?.alert, b?.alert, t),
blockSpacing: lerpDouble(a?.blockSpacing, b?.blockSpacing, t),
);
}