~repos /only-bible-app

#kotlin#android#ios

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.


b765f6f3 pyrossh

1 year ago
remove markdown
assets/md/about-us.md DELETED
@@ -1,19 +0,0 @@
1
- This app was created by me, to be a minimally invasive Bible App as I got tired and fed up with the current trend
2
- of bible apps in the app stores. Most of these apps try to upsell various materials of the bible. Now days they
3
- are also into the subscription business model else trying to get Ad revenue. This is all fueled more by the book publishers
4
- who make huge profits from the original Bible manuscripts by translating them and selling it instead of giving it for free.
5
-
6
- > And said unto them, It is written, My house shall be called the house of prayer; but ye have made it a den of thieves.
7
- > Matthew 21:13
8
-
9
- The word was given freely to all and is expected to be free even after processing/translation. But they have made it a
10
- marketplace to take our God's word and make it den of thieves.
11
-
12
- All the bibles used in this App are free and available in the public domain. Most of the text are sourced from
13
- [The Word Project](https://www.wordproject.org/) and compilation work done by the [Bible Database](https://github.com/godlytalias/Bible-Database) team.
14
-
15
- I also agree to and completely follow the [Copyrights Statement](https://www.wordproject.org/contact/new/copyrights.htm) of the Word project.
16
-
17
- **Contact Us**
18
-
19
- If you have any questions or feedback for us, please contact us at pyros2097@gmail.com.
assets/md/privacy-policy.md DELETED
@@ -1,19 +0,0 @@
1
- Only Bible App does not collect any information about you or your usage of the app.
2
-
3
- It does not send any information about you to anyone. It does not contain ads.
4
-
5
- It will never install additional products on your device or change your device's configuration.
6
-
7
- No ads, No in-app purchases, No distractions.
8
-
9
- **Changes to this Privacy Policy**
10
-
11
- I may update our Privacy Policy from time to time. Thus, you are advised to review this page periodically for any
12
- changes. I will notify you of any changes by posting the new Privacy Policy on this page.
13
-
14
- This policy is effective as of 2023-09-08
15
-
16
- **Contact Us**
17
-
18
- If you have any questions or suggestions about our policy, do not hesitate to contact us at
19
- pyros2097@gmail.com.
assets/md/terms-and-conditions.md DELETED
@@ -1,58 +0,0 @@
1
- By downloading or using the app, these terms will automatically apply to you – you should make sure therefore that you
2
- read them carefully before using the app. You’re not allowed to copy or modify the app, any part of the app, or our
3
- trademarks in any way. You’re not allowed to attempt to extract the source code of the app, and you also shouldn’t try
4
- to translate the app into other languages or make derivative versions. The app itself, and all the trademarks,
5
- copyright, database rights, and other intellectual property rights related to it, still belong to we.
6
-
7
- We are committed to ensuring that the app is as useful and efficient as possible. For that reason, we reserve the
8
- right to make changes to the app or to charge for its services, at any time and for any reason. We will never charge you
9
- for the app or its services without making it very clear to you exactly what you’re paying for.
10
-
11
- The Only Bible App app stores and processes personal data that you have provided to us, to provide my Service. It’s your
12
- responsibility to keep your phone and access to the app secure. We therefore recommend that you do not jailbreak or root
13
- your phone, which is the process of removing software restrictions and limitations imposed by the official operating
14
- system of your device. It could make your phone vulnerable to malware/viruses/malicious programs, compromise your
15
- phone’s security features and it could mean that the Only Bible App app won’t work properly or at all.
16
-
17
- You should be aware that there are certain things that we will not take responsibility for. Certain functions of the
18
- app will require the app to have an active internet connection. The connection can be Wi-Fi or provided by your mobile
19
- network provider, but we cannot take responsibility for the app not working at full functionality if you don’t have
20
- access to Wi-Fi, and you don’t have any of your data allowance left.
21
-
22
- If you’re using the app outside of an area with Wi-Fi, you should remember that the terms of the agreement with your
23
- mobile network provider will still apply. As a result, you may be charged by your mobile provider for the cost of data
24
- for the duration of the connection while accessing the app, or other third-party charges. In using the app, you’re
25
- accepting responsibility for any such charges, including roaming data charges if you use the app outside of your home
26
- territory (i.e. region or country) without turning off data roaming. If you are not the bill payer for the device on
27
- which you’re using the app, please be aware that we assume that you have received permission from the bill payer for
28
- using the app.
29
-
30
- Along the same lines, we cannot always take responsibility for the way you use the app i.e. You need to make sure
31
- that your device stays charged – if it runs out of battery and you can’t turn it on to avail the Service, we cannot
32
- accept responsibility.
33
-
34
- With respect to our responsibility for your use of the app, when you’re using the app, it’s important to bear in
35
- mind that although we endeavor to ensure that it is updated and correct at all times, we do rely on third parties to
36
- provide information to us so that we can make it available to you. we accepts no liability for any loss, direct or
37
- indirect, you experience as a result of relying wholly on this functionality of the app.
38
-
39
- At some point, we may wish to update the app. The app is currently available on Android & iOS – the requirements for the
40
- both systems(and for any additional systems we decide to extend the availability of the app to) may change, and you’ll
41
- need to download the updates if you want to keep using the app. we does not promise that it will always update the
42
- app so that it is relevant to you and/or works with the Android & iOS version that you have installed on your device.
43
- However, you promise to always accept updates to the application when offered to you, We may also wish to stop providing
44
- the app, and may terminate use of it at any time without giving notice of termination to you. Unless we tell you
45
- otherwise, upon any termination, (a) the rights and licenses granted to you in these terms will end; (b) you must stop
46
- using the app, and (if needed) delete it from your device.
47
-
48
- **Changes to this Terms and Conditions**
49
-
50
- I may update our Terms and Conditions from time to time. Thus, you are advised to review this page periodically for any
51
- changes. I will notify you of any changes by posting the new Terms and Conditions on this page.
52
-
53
- These terms and conditions are effective as of 2023-09-08
54
-
55
- **Contact Us**
56
-
57
- If you have any questions or suggestions about our Terms and Conditions, do not hesitate to contact us at
58
- pyros2097@gmail.com.
ios/Podfile.lock CHANGED
@@ -20,6 +20,8 @@ PODS:
20
20
  - FlutterMacOS
21
21
  - url_launcher_ios (0.0.1):
22
22
  - Flutter
23
+ - webview_flutter_wkwebview (0.0.1):
24
+ - Flutter
23
25
 
24
26
  DEPENDENCIES:
25
27
  - audio_session (from `.symlinks/plugins/audio_session/ios`)
@@ -32,6 +34,7 @@ DEPENDENCIES:
32
34
  - share_plus (from `.symlinks/plugins/share_plus/ios`)
33
35
  - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
34
36
  - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
37
+ - webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`)
35
38
 
36
39
  EXTERNAL SOURCES:
37
40
  audio_session:
@@ -54,6 +57,8 @@ EXTERNAL SOURCES:
54
57
  :path: ".symlinks/plugins/shared_preferences_foundation/darwin"
55
58
  url_launcher_ios:
56
59
  :path: ".symlinks/plugins/url_launcher_ios/ios"
60
+ webview_flutter_wkwebview:
61
+ :path: ".symlinks/plugins/webview_flutter_wkwebview/ios"
57
62
 
58
63
  SPEC CHECKSUMS:
59
64
  audio_session: 4f3e461722055d21515cf3261b64c973c062f345
@@ -66,6 +71,7 @@ SPEC CHECKSUMS:
66
71
  share_plus: 599aa54e4ea31d4b4c0e9c911bcc26c55e791028
67
72
  shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
68
73
  url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4
74
+ webview_flutter_wkwebview: be0f0d33777f1bfd0c9fdcb594786704dbf65f36
69
75
 
70
76
  PODFILE CHECKSUM: 797179431f46365b0b4d12774229cd2b42eb3839
71
77
 
lib/app.dart CHANGED
@@ -5,7 +5,6 @@ import "package:only_bible_app/screens/chapter_view_screen.dart";
5
5
  import "package:only_bible_app/store/state.dart";
6
6
  import "package:only_bible_app/theme.dart";
7
7
  import "package:only_bible_app/utils.dart";
8
- import "package:only_bible_app/widgets/scaffold_markdown.dart";
9
8
 
10
9
  final globalNavigatorKey = GlobalKey<NavigatorState>();
11
10
 
@@ -24,13 +23,6 @@ class App extends StatelessWidget {
24
23
  theme: lightTheme,
25
24
  darkTheme: darkTheme,
26
25
  locale: Locale(languageCodeAtom.watch(context)),
27
- // initialRoute: "",
28
- routes: {
29
- // TODO: maybe have a landing page
30
- // "/": (context) => const ScaffoldMarkdown(title: "Privacy Policy", file: "privacy-policy.md"),
31
- "/privacy-policy": (context) => const ScaffoldMarkdown(title: "Privacy Policy", file: "privacy-policy.md"),
32
- "/about-us": (context) => const ScaffoldMarkdown(title: "About Us", file: "about-us.md"),
33
- },
34
26
  home: firstOpenAtom.value
35
27
  ? const BibleSelectScreen()
36
28
  : ChapterViewScreen(
lib/navigation.dart CHANGED
@@ -11,8 +11,7 @@ import "package:only_bible_app/sheets/settings_sheet.dart";
11
11
  import "package:only_bible_app/store/actions.dart";
12
12
  import "package:only_bible_app/store/state.dart";
13
13
  import "package:only_bible_app/utils.dart";
14
- import "package:only_bible_app/widgets/note_sheet.dart";
14
+ import "package:only_bible_app/screens/webview_screen.dart";
15
- import "package:only_bible_app/widgets/scaffold_markdown.dart";
16
15
  import "package:share_plus/share_plus.dart";
17
16
 
18
17
  final actionsShownAtom = Atom(
@@ -46,7 +45,10 @@ createNoTransitionPageRoute(Widget page) {
46
45
  );
47
46
  }
48
47
 
48
+ createSlideRoute(
49
- createSlideRoute({required BuildContext context, TextDirection? slideDir, required Widget page}) {
49
+ {required BuildContext context,
50
+ TextDirection? slideDir,
51
+ required Widget page}) {
50
52
  if (context.isWide || slideDir == null) {
51
53
  return PageRouteBuilder(
52
54
  pageBuilder: (context, _, __) {
@@ -88,24 +90,28 @@ updateStatusBar(bool v) {
88
90
  }
89
91
  }
90
92
 
91
- pushBookChapter(BuildContext context, String bibleName, int book, int chapter, TextDirection? dir) {
93
+ pushBookChapter(BuildContext context, String bibleName, int book, int chapter,
94
+ TextDirection? dir) {
92
95
  dispatch(UpdateChapter(book, chapter));
93
96
  clearEvents(context);
94
97
  Navigator.of(context).push(
95
98
  createSlideRoute(
96
99
  context: context,
97
100
  slideDir: dir,
101
+ page: ChapterViewScreen(
98
- page: ChapterViewScreen(bibleName: bibleName, bookIndex: book, chapterIndex: chapter),
102
+ bibleName: bibleName, bookIndex: book, chapterIndex: chapter),
99
103
  ),
100
104
  );
101
105
  }
102
106
 
107
+ replaceBookChapter(
103
- replaceBookChapter(BuildContext context, String bibleName, int book, int chapter) {
108
+ BuildContext context, String bibleName, int book, int chapter) {
104
109
  dispatch(UpdateChapter(book, chapter));
105
110
  clearEvents(context);
106
111
  Navigator.of(context).pushReplacement(
107
112
  createNoTransitionPageRoute(
113
+ ChapterViewScreen(
108
- ChapterViewScreen(bibleName: bibleName, bookIndex: book, chapterIndex: chapter),
114
+ bibleName: bibleName, bookIndex: book, chapterIndex: chapter),
109
115
  ),
110
116
  );
111
117
  }
@@ -113,11 +119,13 @@ replaceBookChapter(BuildContext context, String bibleName, int book, int chapter
113
119
  nextChapter(BuildContext context, Bible bible, int book, int chapter) {
114
120
  final selectedBook = bible.books[book];
115
121
  if (selectedBook.chapters.length > chapter + 1) {
116
- pushBookChapter(context, bible.name, selectedBook.index, chapter + 1, TextDirection.ltr);
122
+ pushBookChapter(context, bible.name, selectedBook.index, chapter + 1,
123
+ TextDirection.ltr);
117
124
  } else {
118
125
  if (selectedBook.index + 1 < bible.books.length) {
119
126
  final nextBook = bible.books[selectedBook.index + 1];
127
+ pushBookChapter(
120
- pushBookChapter(context, bible.name, nextBook.index, 0, TextDirection.ltr);
128
+ context, bible.name, nextBook.index, 0, TextDirection.ltr);
121
129
  }
122
130
  }
123
131
  }
@@ -128,12 +136,14 @@ previousChapter(BuildContext context, Bible bible, int book, int chapter) {
128
136
  // if (Navigator.of(context).canPop()) {
129
137
  // Navigator.of(context).pop();
130
138
  // } else {
131
- pushBookChapter(context, bible.name, selectedBook.index, chapter - 1, TextDirection.rtl);
139
+ pushBookChapter(context, bible.name, selectedBook.index, chapter - 1,
140
+ TextDirection.rtl);
132
141
  // }
133
142
  } else {
134
143
  if (selectedBook.index - 1 >= 0) {
135
144
  final prevBook = bible.books[selectedBook.index - 1];
136
- pushBookChapter(context, bible.name, prevBook.index, prevBook.chapters.length - 1, TextDirection.rtl);
145
+ pushBookChapter(context, bible.name, prevBook.index,
146
+ prevBook.chapters.length - 1, TextDirection.rtl);
137
147
  }
138
148
  }
139
149
  }
@@ -141,7 +151,9 @@ previousChapter(BuildContext context, Bible bible, int book, int chapter) {
141
151
  showAboutUs(BuildContext context) {
142
152
  Navigator.of(context).push(
143
153
  createNoTransitionPageRoute(
154
+ const WebViewScreen(
144
- const ScaffoldMarkdown(title: "About Us", file: "about-us.md"),
155
+ url: "https://only-bible-app.odoo.com/about-us",
156
+ ),
145
157
  ),
146
158
  );
147
159
  }
@@ -149,7 +161,9 @@ showAboutUs(BuildContext context) {
149
161
  showPrivacyPolicy(BuildContext context) {
150
162
  Navigator.of(context).push(
151
163
  createNoTransitionPageRoute(
164
+ const WebViewScreen(
152
- const ScaffoldMarkdown(title: "Privacy Policy", file: "privacy-policy.md"),
165
+ url: "https://only-bible-app.odoo.com/privacy-policy",
166
+ ),
153
167
  ),
154
168
  );
155
169
  }
@@ -157,7 +171,9 @@ showPrivacyPolicy(BuildContext context) {
157
171
  showTermsAndConditions(BuildContext context) {
158
172
  Navigator.of(context).push(
159
173
  createNoTransitionPageRoute(
174
+ const WebViewScreen(
160
- const ScaffoldMarkdown(title: "Terms and Conditions", file: "terms-and-conditions.md"),
175
+ url: "https://only-bible-app.odoo.com/terms-and-conditions",
176
+ ),
161
177
  ),
162
178
  );
163
179
  }
@@ -186,7 +202,8 @@ changeBook(BuildContext context, Bible bible) {
186
202
  );
187
203
  }
188
204
 
189
- updateCurrentBible(BuildContext context, String name, String code, int book, int chapter) async {
205
+ updateCurrentBible(BuildContext context, String name, String code, int book,
206
+ int chapter) async {
190
207
  hideActions(context);
191
208
  dispatch(UpdateBible(name, code));
192
209
  pushBookChapter(context, name, book, chapter, null);
@@ -198,26 +215,23 @@ shareAppLink(BuildContext context) {
198
215
  subject: "Only Bible App",
199
216
  "https://play.google.com/store/apps/details?id=sh.pyros.only_bible_app",
200
217
  );
201
- } else if (isIOS()) {
202
- Share.share(
203
- subject: "Only Bible App",
204
- "https://apps.apple.com/us/app/only-bible-app/id6467606465",
205
- );
206
218
  } else {
207
219
  Share.share(
208
220
  subject: "Only Bible App",
209
- "https://onlybible.app",
221
+ "https://apps.apple.com/us/app/only-bible-app/id6467606465",
210
222
  );
211
223
  }
212
224
  }
213
225
 
214
226
  rateApp(BuildContext context) {
215
227
  if (isAndroid()) {
228
+ context.openUrl(
216
- context.openUrl("https://play.google.com/store/apps/details?id=sh.pyros.only_bible_app");
229
+ "https://play.google.com/store/apps/details?id=sh.pyros.only_bible_app",
217
- } else if (isIOS()) {
230
+ );
218
- context.openUrl("https://apps.apple.com/us/app/only-bible-app/id6467606465");
219
231
  } else {
232
+ context.openUrl(
220
- context.openUrl("https://apps.apple.com/us/app/only-bible-app/id6467606465");
233
+ "https://apps.apple.com/us/app/only-bible-app/id6467606465",
234
+ );
221
235
  }
222
236
  }
223
237
 
@@ -273,22 +287,4 @@ hideHighlights(BuildContext context) {
273
287
  dispatch(const SetHighlightsShown(false));
274
288
  Navigator.of(context).pop();
275
289
  }
276
- }
290
+ }
277
-
278
- showNoteField(BuildContext context, Bible bible, Verse v) {
279
- final noteText = box.read("${v.book}:${v.chapter}:${v.index}:note") ?? "";
280
- noteTextController.text = noteText;
281
- showModalBottomSheet(
282
- context: context,
283
- isDismissible: true,
284
- enableDrag: true,
285
- showDragHandle: true,
286
- useSafeArea: true,
287
- isScrollControlled: true,
288
- builder: (context) => NoteSheet(bible: bible, verse: v),
289
- );
290
- }
291
-
292
- hideNoteField(BuildContext context) {
293
- Navigator.of(context).pop();
294
- }
lib/screens/webview_screen.dart ADDED
@@ -0,0 +1,23 @@
1
+ import "package:flutter/material.dart";
2
+ import "package:webview_flutter/webview_flutter.dart";
3
+
4
+ class WebViewScreen extends StatelessWidget {
5
+ final String url;
6
+
7
+ const WebViewScreen({super.key, required this.url});
8
+
9
+ @override
10
+ Widget build(BuildContext context) {
11
+ final controller = WebViewController()
12
+ ..setJavaScriptMode(JavaScriptMode.unrestricted)
13
+ ..setBackgroundColor(const Color(0x00000000))
14
+ ..loadRequest(Uri.parse(url));
15
+ return Scaffold(
16
+ backgroundColor: Theme.of(context).colorScheme.background,
17
+ appBar: AppBar(),
18
+ body: SafeArea(
19
+ child: WebViewWidget(controller: controller),
20
+ ),
21
+ );
22
+ }
23
+ }
lib/store/state.dart CHANGED
@@ -1,7 +1,5 @@
1
1
  import "dart:developer";
2
- import "dart:io";
3
2
  import "package:atoms_state/atoms_state.dart";
4
- import "package:flutter/foundation.dart";
5
3
  import "package:flutter/material.dart";
6
4
  import "package:flutter/services.dart";
7
5
  import "package:get_storage/get_storage.dart";
@@ -154,7 +152,9 @@ final selectedVersesAtom = Atom<List<Verse>, AppAction>(
154
152
  reducer: (state, action) {
155
153
  if (action is SelectVerse) {
156
154
  if (isVerseSelected(action.verse)) {
155
+ return (state as List<Verse>)
157
- return (state as List<Verse>).removeBy((it) => it.index == action.verse.index).toList();
156
+ .removeBy((it) => it.index == action.verse.index)
157
+ .toList();
158
158
  } else {
159
159
  return (state as List<Verse>).addBy(action.verse).toList();
160
160
  }
@@ -197,13 +197,13 @@ void removeHighlight(BuildContext context) {
197
197
  }
198
198
 
199
199
  bool isVerseSelected(Verse v) {
200
+ return selectedVersesAtom.value.any((el) =>
200
- return selectedVersesAtom.value.any((el) => el.book == v.book && el.chapter == v.chapter && el.index == v.index);
201
+ el.book == v.book && el.chapter == v.chapter && el.index == v.index);
201
202
  }
202
203
 
203
204
  bool watchVerseSelected(BuildContext context, Verse v) {
204
- return selectedVersesAtom
205
+ return selectedVersesAtom.watch(context).any((el) =>
205
- .watch(context)
206
- .any((el) => el.book == v.book && el.chapter == v.chapter && el.index == v.index);
206
+ el.book == v.book && el.chapter == v.chapter && el.index == v.index);
207
207
  }
208
208
 
209
209
  void onVerseSelected(BuildContext context, Bible bible, Verse v) {
@@ -219,7 +219,8 @@ void onVerseSelected(BuildContext context, Bible bible, Verse v) {
219
219
  TextStyle getHighlightStyle(BuildContext context, Verse v) {
220
220
  if (watchVerseSelected(context, v)) {
221
221
  return TextStyle(
222
+ backgroundColor:
222
- backgroundColor: darkModeAtom.value ? Colors.grey.shade800 : Colors.grey.shade200,
223
+ darkModeAtom.value ? Colors.grey.shade800 : Colors.grey.shade200,
223
224
  );
224
225
  }
225
226
  if (darkModeAtom.watch(context)) {
@@ -228,7 +229,9 @@ TextStyle getHighlightStyle(BuildContext context, Verse v) {
228
229
  // );
229
230
  return TextStyle(
230
231
  backgroundColor: getHighlight(v)?.withOpacity(0.7),
232
+ color: getHighlight(v) != null
233
+ ? Colors.white
231
- color: getHighlight(v) != null ? Colors.white : context.theme.colorScheme.onBackground,
234
+ : context.theme.colorScheme.onBackground,
232
235
  );
233
236
  }
234
237
  return TextStyle(
@@ -264,7 +267,8 @@ class BufferAudioSource extends StreamAudioSource {
264
267
  contentLength: end - start,
265
268
  offset: start,
266
269
  contentType: "audio/mpeg",
270
+ stream:
267
- stream: Stream.value(List<int>.from(_buffer.skip(start).take(end - start))),
271
+ Stream.value(List<int>.from(_buffer.skip(start).take(end - start))),
268
272
  ),
269
273
  );
270
274
  }
@@ -279,22 +283,17 @@ onPlay(BuildContext context, Bible bible) async {
279
283
  for (final v in versesToPlay) {
280
284
  final directory = await getTemporaryDirectory();
281
285
  final pathname = "${bible.name}_${v.book}_${v.chapter}_${v.index}";
282
- final filepath = "${directory.path}/$pathname.mp3";
283
286
  try {
284
287
  final data = await convertText(context.currentLang.audioVoice, v.text);
285
- if (!kIsWeb) {
286
- await File(filepath).writeAsBytes(data);
287
- await player.setUrl("file:$filepath");
288
- } else {
289
- await player.setAudioSource(BufferAudioSource(data));
288
+ await player.setAudioSource(BufferAudioSource(data));
290
- }
291
289
  await player.play();
292
290
  await player.stop();
293
- if (!kIsWeb) {
294
- await File(filepath).delete();
295
- }
296
291
  } catch (err) {
292
+ log(
293
+ "Could not play audio",
294
+ name: "play",
297
- log("Could not play audio", name: "play", error: (err.toString(), pathname));
295
+ error: (err.toString(), pathname),
296
+ );
298
297
  recordError((err.toString(), pathname).toString(), null);
299
298
  if (context.mounted) {
300
299
  showError(context, context.l.audioError);
@@ -306,23 +305,3 @@ onPlay(BuildContext context, Bible bible) async {
306
305
  }
307
306
  }
308
307
  }
309
-
310
- bool hasNote(Verse v) {
311
- return box.hasData("${v.book}:${v.chapter}:${v.index}:note");
312
- }
313
-
314
- saveNote(BuildContext context, Verse v) {
315
- final note = noteTextController.text;
316
- box.write("${v.book}:${v.chapter}:${v.index}:note", note);
317
- box.save();
318
- hideNoteField(context);
319
- hideActions(context);
320
- }
321
-
322
- deleteNote(BuildContext context, Verse v) {
323
- box.remove("${v.book}:${v.chapter}:${v.index}:note");
324
- box.save();
325
- hideNoteField(context);
326
- // TODO: hack to re-render this page
327
- selectedVersesAtom.notifyChanged();
328
- }
lib/utils.dart CHANGED
@@ -154,12 +154,6 @@ extension AppContext on BuildContext {
154
154
  }
155
155
  }
156
156
 
157
- bool isDesktop() {
158
- return defaultTargetPlatform == TargetPlatform.macOS ||
159
- defaultTargetPlatform == TargetPlatform.windows ||
160
- defaultTargetPlatform == TargetPlatform.linux;
161
- }
162
-
163
157
  bool isIOS() {
164
158
  return defaultTargetPlatform == TargetPlatform.iOS;
165
159
  }
lib/widgets/note_sheet.dart DELETED
@@ -1,76 +0,0 @@
1
- import "package:flutter/material.dart";
2
- import "package:only_bible_app/models.dart";
3
- import 'package:only_bible_app/store/state.dart';
4
- import "package:only_bible_app/widgets/modal_button.dart";
5
-
6
- class NoteSheet extends StatelessWidget {
7
- final Bible bible;
8
- final Verse verse;
9
-
10
- const NoteSheet({super.key, required this.verse, required this.bible});
11
-
12
- @override
13
- Widget build(BuildContext context) {
14
- return Container(
15
- padding: EdgeInsets.only(
16
- left: 10,
17
- right: 10,
18
- bottom: MediaQuery.of(context).viewInsets.bottom + 40,
19
- ),
20
- child: Column(
21
- mainAxisSize: MainAxisSize.min,
22
- crossAxisAlignment: CrossAxisAlignment.start,
23
- children: [
24
- Padding(
25
- padding: const EdgeInsets.only(bottom: 5, left: 15),
26
- child: Text(
27
- "Note on ${bible.books[verse.book].name(context)} ${verse.chapter + 1}:${verse.index + 1}",
28
- style: Theme.of(context).textTheme.headlineMedium,
29
- ),
30
- ),
31
- Container(
32
- margin: const EdgeInsets.all(12),
33
- height: 8 * 24.0,
34
- child: TextField(
35
- controller: noteTextController,
36
- maxLines: 100,
37
- keyboardType: TextInputType.multiline,
38
- decoration: const InputDecoration(filled: true, hintText: "Add a note"),
39
- ),
40
- ),
41
- const SizedBox(
42
- height: 20,
43
- ),
44
- Padding(
45
- padding: const EdgeInsets.symmetric(horizontal: 10),
46
- child: Row(
47
- mainAxisAlignment: MainAxisAlignment.start,
48
- children: [
49
- if (noteTextController.value.text != "")
50
- ModalButton(
51
- onPressed: () => deleteNote(context, verse),
52
- icon: Icons.delete_outline,
53
- label: "Delete",
54
- ),
55
- Expanded(
56
- child: Row(
57
- mainAxisAlignment: MainAxisAlignment.end,
58
- children: [
59
- ModalButton(
60
- onPressed: () {
61
- saveNote(context, verse);
62
- },
63
- icon: Icons.save_outlined,
64
- label: "Save",
65
- ),
66
- ],
67
- ),
68
- ),
69
- ],
70
- ),
71
- ),
72
- ],
73
- ),
74
- );
75
- }
76
- }
lib/widgets/scaffold_markdown.dart DELETED
@@ -1,44 +0,0 @@
1
- import "package:flutter/material.dart";
2
- import "package:flutter_markdown/flutter_markdown.dart";
3
- import "package:only_bible_app/utils.dart";
4
-
5
- class ScaffoldMarkdown extends StatelessWidget {
6
- final String title;
7
- final String file;
8
-
9
- const ScaffoldMarkdown({super.key, required this.title, required this.file});
10
-
11
- @override
12
- Widget build(BuildContext context) {
13
- return Scaffold(
14
- backgroundColor: Theme.of(context).colorScheme.background,
15
- appBar: AppBar(
16
- title: Text(title),
17
- ),
18
- body: SafeArea(
19
- child: FutureBuilder(
20
- future: DefaultAssetBundle.of(context).loadString("assets/md/$file"),
21
- builder: (context, snapshot) {
22
- if (snapshot.hasData) {
23
- return Markdown(
24
- styleSheetTheme: MarkdownStyleSheetBaseTheme.material,
25
- styleSheet: MarkdownStyleSheet(
26
- p: Theme.of(context).textTheme.bodyMedium,
27
- h1: Theme.of(context).textTheme.headlineMedium,
28
- h2: Theme.of(context).textTheme.headlineMedium,
29
- ),
30
- data: snapshot.data!,
31
- onTapLink: (text, href, title) {
32
- context.openUrl(href!);
33
- },
34
- );
35
- }
36
- return const Center(
37
- child: CircularProgressIndicator(),
38
- );
39
- },
40
- ),
41
- ),
42
- );
43
- }
44
- }
pubspec.lock CHANGED
@@ -241,14 +241,6 @@ packages:
241
241
  url: "https://pub.dev"
242
242
  source: hosted
243
243
  version: "2.0.5"
244
- eventify:
245
- dependency: transitive
246
- description:
247
- name: eventify
248
- sha256: b829429f08586cc2001c628e7499e3e3c2493a1d895fd73b00ecb23351aa5a66
249
- url: "https://pub.dev"
250
- source: hosted
251
- version: "1.0.1"
252
244
  fake_async:
253
245
  dependency: transitive
254
246
  description:
@@ -320,14 +312,6 @@ packages:
320
312
  description: flutter
321
313
  source: sdk
322
314
  version: "0.0.0"
323
- flutter_markdown:
324
- dependency: "direct main"
325
- description:
326
- name: flutter_markdown
327
- sha256: "2b206d397dd7836ea60035b2d43825c8a303a76a5098e66f42d55a753e18d431"
328
- url: "https://pub.dev"
329
- source: hosted
330
- version: "0.6.17+1"
331
315
  flutter_native_splash:
332
316
  dependency: "direct main"
333
317
  description:
@@ -484,14 +468,6 @@ packages:
484
468
  url: "https://pub.dev"
485
469
  source: hosted
486
470
  version: "0.9.34"
487
- just_audio_mpv:
488
- dependency: "direct main"
489
- description:
490
- name: just_audio_mpv
491
- sha256: d6e4e9fd20bfb9d2fd5e3dcd7906c90ed07f83d1d2f44f31204160821ab62fed
492
- url: "https://pub.dev"
493
- source: hosted
494
- version: "0.1.7"
495
471
  just_audio_platform_interface:
496
472
  dependency: transitive
497
473
  description:
@@ -508,14 +484,6 @@ packages:
508
484
  url: "https://pub.dev"
509
485
  source: hosted
510
486
  version: "0.4.8"
511
- just_audio_windows:
512
- dependency: "direct main"
513
- description:
514
- name: just_audio_windows
515
- sha256: "7b8801f3987e98a2002cd23b5600b2daf162248ff1413266fb44c84448c1c0d3"
516
- url: "https://pub.dev"
517
- source: hosted
518
- version: "0.2.0"
519
487
  leak_tracker:
520
488
  dependency: transitive
521
489
  description:
@@ -556,14 +524,6 @@ packages:
556
524
  url: "https://pub.dev"
557
525
  source: hosted
558
526
  version: "1.2.0"
559
- markdown:
560
- dependency: transitive
561
- description:
562
- name: markdown
563
- sha256: acf35edccc0463a9d7384e437c015a3535772e09714cf60e07eeef3a15870dcd
564
- url: "https://pub.dev"
565
- source: hosted
566
- version: "7.1.1"
567
527
  matcher:
568
528
  dependency: transitive
569
529
  description:
@@ -596,14 +556,6 @@ packages:
596
556
  url: "https://pub.dev"
597
557
  source: hosted
598
558
  version: "1.0.4"
599
- mpv_dart:
600
- dependency: transitive
601
- description:
602
- name: mpv_dart
603
- sha256: a33bd9a68439b496b7a5f36fecd3aa3cf6cbf0176ae15b9b60b12ae96e58f5a4
604
- url: "https://pub.dev"
605
- source: hosted
606
- version: "0.0.1"
607
559
  node_preamble:
608
560
  dependency: transitive
609
561
  description:
@@ -712,10 +664,10 @@ packages:
712
664
  dependency: transitive
713
665
  description:
714
666
  name: plugin_platform_interface
715
- sha256: "43798d895c929056255600343db8f049921cbec94d31ec87f1dc5c16c01935dd"
667
+ sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
716
668
  url: "https://pub.dev"
717
669
  source: hosted
718
- version: "2.1.5"
670
+ version: "2.1.8"
719
671
  pointycastle:
720
672
  dependency: transitive
721
673
  description:
@@ -1121,6 +1073,38 @@ packages:
1121
1073
  url: "https://pub.dev"
1122
1074
  source: hosted
1123
1075
  version: "1.2.0"
1076
+ webview_flutter:
1077
+ dependency: "direct main"
1078
+ description:
1079
+ name: webview_flutter
1080
+ sha256: "25e1b6e839e8cbfbd708abc6f85ed09d1727e24e08e08c6b8590d7c65c9a8932"
1081
+ url: "https://pub.dev"
1082
+ source: hosted
1083
+ version: "4.7.0"
1084
+ webview_flutter_android:
1085
+ dependency: transitive
1086
+ description:
1087
+ name: webview_flutter_android
1088
+ sha256: f038ee2fae73b509dde1bc9d2c5a50ca92054282de17631a9a3d515883740934
1089
+ url: "https://pub.dev"
1090
+ source: hosted
1091
+ version: "3.16.0"
1092
+ webview_flutter_platform_interface:
1093
+ dependency: transitive
1094
+ description:
1095
+ name: webview_flutter_platform_interface
1096
+ sha256: d937581d6e558908d7ae3dc1989c4f87b786891ab47bb9df7de548a151779d8d
1097
+ url: "https://pub.dev"
1098
+ source: hosted
1099
+ version: "2.10.0"
1100
+ webview_flutter_wkwebview:
1101
+ dependency: transitive
1102
+ description:
1103
+ name: webview_flutter_wkwebview
1104
+ sha256: f12f8d8a99784b863e8b85e4a9a5e3cf1839d6803d2c0c3e0533a8f3c5a992a7
1105
+ url: "https://pub.dev"
1106
+ source: hosted
1107
+ version: "3.13.0"
1124
1108
  win32:
1125
1109
  dependency: transitive
1126
1110
  description:
@@ -1154,5 +1138,5 @@ packages:
1154
1138
  source: hosted
1155
1139
  version: "3.1.2"
1156
1140
  sdks:
1157
- dart: ">=3.2.0-0 <4.0.0"
1141
+ dart: ">=3.2.3 <4.0.0"
1158
- flutter: ">=3.10.0"
1142
+ flutter: ">=3.16.6"
pubspec.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  name: only_bible_app
2
2
  description: The only bible app you will ever need
3
3
  publish_to: 'none'
4
- version: 1.0.4+2
4
+ version: 1.0.4+9
5
5
 
6
6
  environment:
7
7
  sdk: '>=3.0.6 <4.0.0'
@@ -16,8 +16,6 @@ dependencies:
16
16
  intl: any
17
17
  path_provider: ^2.0.15
18
18
  just_audio: ^0.9.34
19
- just_audio_windows: ^0.2.0
20
- just_audio_mpv: ^0.1.7
21
19
  shared_preferences: ^2.2.0
22
20
  flutter_native_splash: ^2.3.1
23
21
  flutter_swipe_detector: ^2.0.0
@@ -25,12 +23,12 @@ dependencies:
25
23
  settings_ui: ^2.0.2
26
24
  get_storage: ^2.1.1
27
25
  share_plus: ^7.1.0
28
- flutter_markdown: ^0.6.17+1
29
26
  url_launcher: ^6.1.12
30
27
  package_info_plus: ^4.1.0
31
28
  flutter_azure_tts: ^0.1.6
32
29
  http: ^0.13.6
33
30
  atoms_state: 0.0.2
31
+ webview_flutter: ^4.7.0
34
32
 
35
33
  dev_dependencies:
36
34
  flutter_test:
@@ -47,7 +45,6 @@ flutter:
47
45
  assets:
48
46
  - assets/bibles/
49
47
  - assets/fonts/
50
- - assets/md/
51
48
  fonts:
52
49
  - family: Roboto
53
50
  fonts:
readme.md CHANGED
@@ -68,7 +68,8 @@ https://onlybible.app
68
68
 
69
69
 
70
70
  ## Release Process
71
- Update version and build number in pubspec.yaml ex: 1.0.7+1
71
+ Increment the patch/minor version in pubspec.yaml for iOS ex: 1.0.7
72
+ Increment versionCode in pubspec.yaml for android ex: +9
72
73
 
73
74
  ### android
74
75