Skip to content

Commit a19b468

Browse files
committed
rename header to heading for inline code
1 parent 6d4de8e commit a19b468

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

lib/src/widgets/default_styles.dart

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -59,24 +59,24 @@ class DefaultTextBlockStyle {
5959
class InlineCodeStyle {
6060
InlineCodeStyle({
6161
required this.style,
62-
this.heading1,
63-
this.heading2,
64-
this.heading3,
62+
this.header1,
63+
this.header2,
64+
this.header3,
6565
this.backgroundColor,
6666
this.radius,
6767
});
6868

6969
/// Base text style for an inline code.
7070
final TextStyle style;
7171

72-
/// Style override for inline code in headings level 1.
73-
final TextStyle? heading1;
72+
/// Style override for inline code in header level 1.
73+
final TextStyle? header1;
7474

7575
/// Style override for inline code in headings level 2.
76-
final TextStyle? heading2;
76+
final TextStyle? header2;
7777

7878
/// Style override for inline code in headings level 3.
79-
final TextStyle? heading3;
79+
final TextStyle? header3;
8080

8181
/// Background color for inline code.
8282
final Color? backgroundColor;
@@ -88,13 +88,13 @@ class InlineCodeStyle {
8888
/// [lineStyle].
8989
TextStyle styleFor(Style lineStyle) {
9090
if (lineStyle.containsKey(Attribute.h1.key)) {
91-
return heading1 ?? style;
91+
return header1 ?? style;
9292
}
9393
if (lineStyle.containsKey(Attribute.h2.key)) {
94-
return heading2 ?? style;
94+
return header2 ?? style;
9595
}
9696
if (lineStyle.containsKey(Attribute.h3.key)) {
97-
return heading3 ?? style;
97+
return header3 ?? style;
9898
}
9999
return style;
100100
}
@@ -108,16 +108,16 @@ class InlineCodeStyle {
108108
return false;
109109
}
110110
return other.style == style &&
111-
other.heading1 == heading1 &&
112-
other.heading2 == heading2 &&
113-
other.heading3 == heading3 &&
111+
other.header1 == header1 &&
112+
other.header2 == header2 &&
113+
other.header3 == header3 &&
114114
other.backgroundColor == backgroundColor &&
115115
other.radius == radius;
116116
}
117117

118118
@override
119119
int get hashCode =>
120-
Object.hash(style, heading1, heading2, heading3, backgroundColor, radius);
120+
Object.hash(style, header1, header2, header3, backgroundColor, radius);
121121
}
122122

123123
class DefaultListBlockStyle extends DefaultTextBlockStyle {
@@ -255,12 +255,12 @@ class DefaultStyles {
255255
backgroundColor: Colors.grey.shade100,
256256
radius: const Radius.circular(3),
257257
style: inlineCodeStyle,
258-
heading1: inlineCodeStyle.copyWith(
258+
header1: inlineCodeStyle.copyWith(
259259
fontSize: 32,
260260
fontWeight: FontWeight.w300,
261261
),
262-
heading2: inlineCodeStyle.copyWith(fontSize: 22),
263-
heading3: inlineCodeStyle.copyWith(
262+
header2: inlineCodeStyle.copyWith(fontSize: 22),
263+
header3: inlineCodeStyle.copyWith(
264264
fontSize: 18,
265265
fontWeight: FontWeight.w500,
266266
),

0 commit comments

Comments
 (0)