createMarkDownStyleSheet function

MarkdownStyleSheet createMarkDownStyleSheet(
  1. BuildContext context, {
  2. Color? color,
  3. double? fontSize,
  4. double? lineHeight,
})

Implementation

MarkdownStyleSheet createMarkDownStyleSheet(
  BuildContext context, {
  Color? color,
  double? fontSize,
  double? lineHeight,
}) {
  final theme = Theme.of(context);
  return MarkdownStyleSheet.fromTheme(
    theme,
  ).copyWith(
    p: theme.textTheme.bodyMedium?.copyWith(
      fontSize: fontSize,
      height: lineHeight ?? 1.5,
      color: color ?? theme.colorScheme.secondary,
    ),
  );
}