~repos /only-bible-app
GIT_CONFIG_PARAMETERS="'http.version=HTTP/1.1'" git clone
https://git.pyrossh.dev/only-bible-app.git
Discussions:
https://groups.google.com/g/rust-embed-devs
The only bible app you will ever need. No ads. No in-app purchases. No distractions.
8260053b
—
pyrossh 1 month ago
improve styling
- lib/home.dart +22 -26
lib/home.dart
CHANGED
|
@@ -16,19 +16,29 @@ class Home extends StatelessWidget {
|
|
|
16
16
|
const Home({super.key, required this.bookIndex, required this.chapterIndex});
|
|
17
17
|
|
|
18
18
|
List<InlineSpan> _buildHeadingSpans(
|
|
19
|
+
BuildContext context,
|
|
20
|
+
Bible bible,
|
|
21
|
+
String heading,
|
|
19
|
-
|
|
22
|
+
List<Reference> references,
|
|
23
|
+
TextStyle style,
|
|
24
|
+
double fontSize,
|
|
25
|
+
) {
|
|
20
26
|
final spans = <InlineSpan>[];
|
|
21
|
-
spans.add(TextSpan(text: heading, style: style));
|
|
27
|
+
spans.add(TextSpan(text: heading, style: style.copyWith(fontSize: fontSize)));
|
|
28
|
+
final refStyle = style.copyWith(
|
|
29
|
+
color: Colors.blueAccent,
|
|
30
|
+
fontStyle: FontStyle.italic,
|
|
31
|
+
fontSize: fontSize - 1,
|
|
32
|
+
fontWeight: FontWeight.w500,
|
|
33
|
+
);
|
|
34
|
+
final symbolStyle = refStyle.copyWith(
|
|
35
|
+
color: Theme.of(context).colorScheme.onSurface,
|
|
36
|
+
);
|
|
22
37
|
if (references.isNotEmpty) {
|
|
23
38
|
spans.add(
|
|
24
39
|
TextSpan(
|
|
25
40
|
text: "\n(",
|
|
26
|
-
style:
|
|
41
|
+
style: symbolStyle,
|
|
27
|
-
color: Theme.of(context).colorScheme.onSurface,
|
|
28
|
-
fontStyle: FontStyle.italic,
|
|
29
|
-
fontSize: 15,
|
|
30
|
-
fontWeight: FontWeight.w500,
|
|
31
|
-
),
|
|
32
42
|
),
|
|
33
43
|
);
|
|
34
44
|
for (var i = 0; i < references.length; i++) {
|
|
@@ -39,24 +49,14 @@ class Home extends StatelessWidget {
|
|
|
39
49
|
spans.add(
|
|
40
50
|
TextSpan(
|
|
41
51
|
text: "; ",
|
|
42
|
-
style:
|
|
52
|
+
style: symbolStyle,
|
|
43
|
-
color: Theme.of(context).colorScheme.onSurface,
|
|
44
|
-
fontStyle: FontStyle.italic,
|
|
45
|
-
fontSize: 15,
|
|
46
|
-
fontWeight: FontWeight.w500,
|
|
47
|
-
),
|
|
48
53
|
),
|
|
49
54
|
);
|
|
50
55
|
}
|
|
51
56
|
spans.add(
|
|
52
57
|
TextSpan(
|
|
53
58
|
text: label,
|
|
54
|
-
style:
|
|
59
|
+
style: refStyle,
|
|
55
|
-
color: Colors.blueAccent,
|
|
56
|
-
fontStyle: FontStyle.italic,
|
|
57
|
-
fontSize: 15,
|
|
58
|
-
fontWeight: FontWeight.w500,
|
|
59
|
-
),
|
|
60
60
|
recognizer: TapGestureRecognizer()
|
|
61
61
|
..onTap = () => context.dispatch(GoToChapterAction(context.router, ref.book, ref.chapter)),
|
|
62
62
|
),
|
|
@@ -65,12 +65,7 @@ class Home extends StatelessWidget {
|
|
|
65
65
|
spans.add(
|
|
66
66
|
TextSpan(
|
|
67
67
|
text: ")",
|
|
68
|
-
style:
|
|
68
|
+
style: symbolStyle,
|
|
69
|
-
color: Theme.of(context).colorScheme.onSurface,
|
|
70
|
-
fontStyle: FontStyle.italic,
|
|
71
|
-
fontSize: 15,
|
|
72
|
-
fontWeight: FontWeight.w500,
|
|
73
|
-
),
|
|
74
69
|
),
|
|
75
70
|
);
|
|
76
71
|
}
|
|
@@ -126,6 +121,7 @@ class Home extends StatelessWidget {
|
|
|
126
121
|
v.heading!,
|
|
127
122
|
v.headingReferences ?? [],
|
|
128
123
|
theme.labelLarge!,
|
|
124
|
+
fontSize,
|
|
129
125
|
),
|
|
130
126
|
TextSpan(
|
|
131
127
|
text: "${v.index + 1} ",
|