1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
import 'package:flutter/material.dart';
import 'package:kulinar_app/constants.dart';
import 'package:flutter_markdown/flutter_markdown.dart';
class CustomMarkdownStyle extends MarkdownStyleSheet {
static sheet() {
return MarkdownStyleSheet(
tableBody: cRecipeDescriptionStyle,
a: cRecipeDescriptionStyle,
p: cRecipeDescriptionStyle,
h1: cRecipeSubtitleStyle.copyWith(color: Colors.black87),
h2: cRecipeSubtitleStyle.copyWith(color: Colors.black87),
h3: cRecipeSubtitleStyle,
h4: cRecipeSubtitleStyle,
h5: cRecipeSubtitleStyle,
h6: cRecipeSubtitleStyle,
blockquote: cRecipeDescriptionStyle,
blockquotePadding: const EdgeInsets.only(left: 16.0, top: 4.0, bottom: 4.0),
blockquoteDecoration: const BoxDecoration(border: Border(left: BorderSide(color: cPrimaryColor, width: 2.0))),
code: cRecipeDescriptionStyle,
codeblockPadding: const EdgeInsets.only(left: 16.0, top: 4.0, bottom: 4.0),
codeblockDecoration: const BoxDecoration(border: Border(left: BorderSide(color: Colors.black45, width: 2.0))),
listIndent: 15.0,
listBullet: cRecipeDescriptionStyle,
listBulletPadding: const EdgeInsets.only(right: 10.0),
horizontalRuleDecoration: const BoxDecoration(border: Border(top: BorderSide(color: Colors.black12))),
);
}
}
|