~repos /only-bible-app
git clone https://pyrossh.dev/repos/only-bible-app.git
The only bible app you will ever need. No ads. No in-app purchases. No distractions.
5a67adfd
—
pyrossh 2 years ago
fix header
- lib/app.dart +0 -38
- lib/screens/chapter_view_screen.dart +2 -1
- lib/state.dart +1 -0
- lib/utils/dialog.dart +0 -1
- lib/widgets/header.dart +4 -1
- pubspec.lock +0 -8
- pubspec.yaml +0 -1
lib/app.dart
CHANGED
|
@@ -19,44 +19,6 @@ class App extends StatelessWidget {
|
|
|
19
19
|
theme: lightTheme,
|
|
20
20
|
darkTheme: darkTheme,
|
|
21
21
|
home: ChapterViewScreen(book: bookIndex.value, chapter: chapterIndex.value),
|
|
22
|
-
// routerConfig: GoRouter(
|
|
23
|
-
// debugLogDiagnostics: true,
|
|
24
|
-
// initialLocation: "/${selectedBible.value!.books[bookIndex.value].name}/${chapterIndex.value}",
|
|
25
|
-
// screens: [
|
|
26
|
-
// ShellRoute(
|
|
27
|
-
// builder: (context, state, child) {
|
|
28
|
-
// if (isWide(context)) {
|
|
29
|
-
// return Scaffold(
|
|
30
|
-
// backgroundColor: Theme.of(context).colorScheme.background,
|
|
31
|
-
// body: Row(
|
|
32
|
-
// children: [
|
|
33
|
-
// const Sidebar(),
|
|
34
|
-
// Flexible(
|
|
35
|
-
// child: child,
|
|
36
|
-
// ),
|
|
37
|
-
// ],
|
|
38
|
-
// ),
|
|
39
|
-
// );
|
|
40
|
-
// }
|
|
41
|
-
// return Scaffold(
|
|
42
|
-
// backgroundColor: Theme.of(context).colorScheme.background,
|
|
43
|
-
// body: SafeArea(
|
|
44
|
-
// child: child,
|
|
45
|
-
// ),
|
|
46
|
-
// );
|
|
47
|
-
// },
|
|
48
|
-
// screens: [
|
|
49
|
-
// GoRouteData.$route(
|
|
50
|
-
// path: "/:book/:chapter",
|
|
51
|
-
// factory: (GoRouterState state) => HomeScreen(
|
|
52
|
-
// book: state.pathParameters["book"]!,
|
|
53
|
-
// chapter: int.parse(state.pathParameters["chapter"]!),
|
|
54
|
-
// ),
|
|
55
|
-
// ),
|
|
56
|
-
// ],
|
|
57
|
-
// ),
|
|
58
|
-
// ],
|
|
59
|
-
// ),
|
|
60
22
|
);
|
|
61
23
|
}
|
|
62
24
|
}
|
lib/screens/chapter_view_screen.dart
CHANGED
|
@@ -24,7 +24,8 @@ class ChapterViewScreen extends StatelessWidget {
|
|
|
24
24
|
enableDrag: false,
|
|
25
25
|
onClosing: () {},
|
|
26
26
|
builder: (BuildContext ctx) => Container(
|
|
27
|
+
// TODO: check if this is needed
|
|
27
|
-
padding: const EdgeInsets.only(bottom:
|
|
28
|
+
// padding: const EdgeInsets.only(bottom: 0),
|
|
28
29
|
child: const Row(
|
|
29
30
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
30
31
|
children: [
|
lib/state.dart
CHANGED
|
@@ -195,6 +195,7 @@ onPlay(BuildContext context) async {
|
|
|
195
195
|
await player.stop();
|
|
196
196
|
}
|
|
197
197
|
} catch (err) {
|
|
198
|
+
// TODO: log this error
|
|
198
199
|
print(err.toString());
|
|
199
200
|
showError(context, "Could not play audio");
|
|
200
201
|
} finally {
|
lib/utils/dialog.dart
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import "dart:ui";
|
|
2
2
|
import "package:flutter/material.dart";
|
|
3
|
-
import "package:go_router/go_router.dart";
|
|
4
3
|
|
|
5
4
|
Future<T?> showCustomDialog<T>(BuildContext context, Widget child) {
|
|
6
5
|
return showGeneralDialog<T>(
|
lib/widgets/header.dart
CHANGED
|
@@ -20,6 +20,7 @@ class Header extends StatelessWidget {
|
|
|
20
20
|
left: 20,
|
|
21
21
|
right: 20,
|
|
22
22
|
top: isWide(context) ? 10 : 0,
|
|
23
|
+
bottom: 0,
|
|
23
24
|
),
|
|
24
25
|
child: Column(
|
|
25
26
|
children: [
|
|
@@ -43,6 +44,7 @@ class Header extends StatelessWidget {
|
|
|
43
44
|
style: Theme.of(context).textTheme.headlineMedium,
|
|
44
45
|
),
|
|
45
46
|
onPressed: () {
|
|
47
|
+
// TODO: move this to state
|
|
46
48
|
Navigator.of(context).push(
|
|
47
49
|
PageRouteBuilder(
|
|
48
50
|
opaque: false,
|
|
@@ -53,6 +55,7 @@ class Header extends StatelessWidget {
|
|
|
53
55
|
);
|
|
54
56
|
},
|
|
55
57
|
),
|
|
58
|
+
// TODO: show this in more menu in mobile
|
|
56
59
|
Row(
|
|
57
60
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
58
61
|
children: [
|
|
@@ -86,7 +89,7 @@ class Header extends StatelessWidget {
|
|
|
86
89
|
),
|
|
87
90
|
],
|
|
88
91
|
),
|
|
89
|
-
const Divider(
|
|
92
|
+
const Divider(height: 0),
|
|
90
93
|
],
|
|
91
94
|
));
|
|
92
95
|
}
|
pubspec.lock
CHANGED
|
@@ -375,14 +375,6 @@ packages:
|
|
|
375
375
|
url: "https://pub.dev"
|
|
376
376
|
source: hosted
|
|
377
377
|
version: "2.1.2"
|
|
378
|
-
go_router:
|
|
379
|
-
dependency: "direct main"
|
|
380
|
-
description:
|
|
381
|
-
name: go_router
|
|
382
|
-
sha256: b3cadd2cd59a4103fd5f6bc572ca75111264698784e927aa471921c3477d5475
|
|
383
|
-
url: "https://pub.dev"
|
|
384
|
-
source: hosted
|
|
385
|
-
version: "10.0.0"
|
|
386
378
|
graphs:
|
|
387
379
|
dependency: transitive
|
|
388
380
|
description:
|
pubspec.yaml
CHANGED
|
@@ -16,7 +16,6 @@ dependencies:
|
|
|
16
16
|
flutter_persistent_value_notifier: ^1.0.2
|
|
17
17
|
flutter_reactive_value: ^1.0.4
|
|
18
18
|
just_audio: ^0.9.34
|
|
19
|
-
go_router: ^10.0.0
|
|
20
19
|
shared_preferences: ^2.2.0
|
|
21
20
|
flutter_native_splash: ^2.3.1
|
|
22
21
|
flutter_swipe_detector: ^2.0.0
|