~repos /only-bible-app

#kotlin#android#ios

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.


Files changed (43) hide show
  1. android/app/src/main/res/drawable-hdpi/android12splash.png +0 -0
  2. android/app/src/main/res/drawable-hdpi/splash.png +0 -0
  3. android/app/src/main/res/drawable-mdpi/android12splash.png +0 -0
  4. android/app/src/main/res/drawable-mdpi/splash.png +0 -0
  5. android/app/src/main/res/drawable-night-hdpi/android12splash.png +0 -0
  6. android/app/src/main/res/drawable-night-mdpi/android12splash.png +0 -0
  7. android/app/src/main/res/drawable-night-xhdpi/android12splash.png +0 -0
  8. android/app/src/main/res/drawable-night-xxhdpi/android12splash.png +0 -0
  9. android/app/src/main/res/drawable-night-xxxhdpi/android12splash.png +0 -0
  10. android/app/src/main/res/drawable-v21/background.png +0 -0
  11. android/app/src/main/res/drawable-v21/launch_background.xml +6 -9
  12. android/app/src/main/res/drawable-xhdpi/android12splash.png +0 -0
  13. android/app/src/main/res/drawable-xhdpi/splash.png +0 -0
  14. android/app/src/main/res/drawable-xxhdpi/android12splash.png +0 -0
  15. android/app/src/main/res/drawable-xxhdpi/splash.png +0 -0
  16. android/app/src/main/res/drawable-xxxhdpi/android12splash.png +0 -0
  17. android/app/src/main/res/drawable-xxxhdpi/splash.png +0 -0
  18. android/app/src/main/res/drawable/background.png +0 -0
  19. android/app/src/main/res/drawable/launch_background.xml +6 -9
  20. android/app/src/main/res/values-night-v31/styles.xml +21 -0
  21. android/app/src/main/res/values-night/styles.xml +4 -0
  22. android/app/src/main/res/values-v31/styles.xml +21 -0
  23. android/app/src/main/res/values/styles.xml +4 -0
  24. ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json +21 -0
  25. ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png +0 -0
  26. ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +5 -5
  27. ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png +0 -0
  28. ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected] +0 -0
  29. ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected] +0 -0
  30. ios/Runner/Base.lproj/LaunchScreen.storyboard +12 -5
  31. ios/Runner/Info.plist +64 -62
  32. lib/main.dart +0 -1
  33. lib/theme.dart +1 -1
  34. lib/widgets/verses_view.dart +44 -86
  35. web/index.html +77 -7
  36. web/splash/img/dark-1x.png +0 -0
  37. web/splash/img/dark-2x.png +0 -0
  38. web/splash/img/dark-3x.png +0 -0
  39. web/splash/img/dark-4x.png +0 -0
  40. web/splash/img/light-1x.png +0 -0
  41. web/splash/img/light-2x.png +0 -0
  42. web/splash/img/light-3x.png +0 -0
  43. web/splash/img/light-4x.png +0 -0
android/app/src/main/res/drawable-hdpi/android12splash.png ADDED
Binary file
android/app/src/main/res/drawable-hdpi/splash.png ADDED
Binary file
android/app/src/main/res/drawable-mdpi/android12splash.png ADDED
Binary file
android/app/src/main/res/drawable-mdpi/splash.png ADDED
Binary file
android/app/src/main/res/drawable-night-hdpi/android12splash.png ADDED
Binary file
android/app/src/main/res/drawable-night-mdpi/android12splash.png ADDED
Binary file
android/app/src/main/res/drawable-night-xhdpi/android12splash.png ADDED
Binary file
android/app/src/main/res/drawable-night-xxhdpi/android12splash.png ADDED
Binary file
android/app/src/main/res/drawable-night-xxxhdpi/android12splash.png ADDED
Binary file
android/app/src/main/res/drawable-v21/background.png ADDED
Binary file
android/app/src/main/res/drawable-v21/launch_background.xml CHANGED
@@ -1,12 +1,9 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Modify this file to customize your launch splash screen -->
3
2
  <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
4
- <item android:drawable="?android:colorBackground" />
5
-
6
- <!-- You can insert your own image assets here -->
7
- <!-- <item>
3
+ <item>
8
- <bitmap
9
- android:gravity="center"
10
- android:src="@mipmap/launch_image" />
4
+ <bitmap android:gravity="fill" android:src="@drawable/background"/>
11
- </item> -->
5
+ </item>
6
+ <item>
7
+ <bitmap android:gravity="center" android:src="@drawable/splash"/>
8
+ </item>
12
9
  </layer-list>
android/app/src/main/res/drawable-xhdpi/android12splash.png ADDED
Binary file
android/app/src/main/res/drawable-xhdpi/splash.png ADDED
Binary file
android/app/src/main/res/drawable-xxhdpi/android12splash.png ADDED
Binary file
android/app/src/main/res/drawable-xxhdpi/splash.png ADDED
Binary file
android/app/src/main/res/drawable-xxxhdpi/android12splash.png ADDED
Binary file
android/app/src/main/res/drawable-xxxhdpi/splash.png ADDED
Binary file
android/app/src/main/res/drawable/background.png ADDED
Binary file
android/app/src/main/res/drawable/launch_background.xml CHANGED
@@ -1,12 +1,9 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Modify this file to customize your launch splash screen -->
3
2
  <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
4
- <item android:drawable="@android:color/white" />
5
-
6
- <!-- You can insert your own image assets here -->
7
- <!-- <item>
3
+ <item>
8
- <bitmap
9
- android:gravity="center"
10
- android:src="@mipmap/launch_image" />
4
+ <bitmap android:gravity="fill" android:src="@drawable/background"/>
11
- </item> -->
5
+ </item>
6
+ <item>
7
+ <bitmap android:gravity="center" android:src="@drawable/splash"/>
8
+ </item>
12
9
  </layer-list>
android/app/src/main/res/values-night-v31/styles.xml ADDED
@@ -0,0 +1,21 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <resources>
3
+ <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
4
+ <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
5
+ <item name="android:forceDarkAllowed">false</item>
6
+ <item name="android:windowFullscreen">false</item>
7
+ <item name="android:windowDrawsSystemBarBackgrounds">false</item>
8
+ <item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
9
+ <item name="android:windowSplashScreenBackground">#FFFFFF</item>
10
+ <item name="android:windowSplashScreenAnimatedIcon">@drawable/android12splash</item>
11
+ </style>
12
+ <!-- Theme applied to the Android Window as soon as the process has started.
13
+ This theme determines the color of the Android Window while your
14
+ Flutter UI initializes, as well as behind your Flutter UI while its
15
+ running.
16
+
17
+ This Theme is only used starting with V2 of Flutter's Android embedding. -->
18
+ <style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
19
+ <item name="android:windowBackground">?android:colorBackground</item>
20
+ </style>
21
+ </resources>
android/app/src/main/res/values-night/styles.xml CHANGED
@@ -5,6 +5,10 @@
5
5
  <!-- Show a splash screen on the activity. Automatically removed when
6
6
  the Flutter engine draws its first frame -->
7
7
  <item name="android:windowBackground">@drawable/launch_background</item>
8
+ <item name="android:forceDarkAllowed">false</item>
9
+ <item name="android:windowFullscreen">false</item>
10
+ <item name="android:windowDrawsSystemBarBackgrounds">false</item>
11
+ <item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
8
12
  </style>
9
13
  <!-- Theme applied to the Android Window as soon as the process has started.
10
14
  This theme determines the color of the Android Window while your
android/app/src/main/res/values-v31/styles.xml ADDED
@@ -0,0 +1,21 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <resources>
3
+ <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
4
+ <style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
5
+ <item name="android:forceDarkAllowed">false</item>
6
+ <item name="android:windowFullscreen">false</item>
7
+ <item name="android:windowDrawsSystemBarBackgrounds">false</item>
8
+ <item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
9
+ <item name="android:windowSplashScreenBackground">#FFFFFF</item>
10
+ <item name="android:windowSplashScreenAnimatedIcon">@drawable/android12splash</item>
11
+ </style>
12
+ <!-- Theme applied to the Android Window as soon as the process has started.
13
+ This theme determines the color of the Android Window while your
14
+ Flutter UI initializes, as well as behind your Flutter UI while its
15
+ running.
16
+
17
+ This Theme is only used starting with V2 of Flutter's Android embedding. -->
18
+ <style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
19
+ <item name="android:windowBackground">?android:colorBackground</item>
20
+ </style>
21
+ </resources>
android/app/src/main/res/values/styles.xml CHANGED
@@ -5,6 +5,10 @@
5
5
  <!-- Show a splash screen on the activity. Automatically removed when
6
6
  the Flutter engine draws its first frame -->
7
7
  <item name="android:windowBackground">@drawable/launch_background</item>
8
+ <item name="android:forceDarkAllowed">false</item>
9
+ <item name="android:windowFullscreen">false</item>
10
+ <item name="android:windowDrawsSystemBarBackgrounds">false</item>
11
+ <item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
8
12
  </style>
9
13
  <!-- Theme applied to the Android Window as soon as the process has started.
10
14
  This theme determines the color of the Android Window while your
ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "images" : [
3
+ {
4
+ "filename" : "background.png",
5
+ "idiom" : "universal",
6
+ "scale" : "1x"
7
+ },
8
+ {
9
+ "idiom" : "universal",
10
+ "scale" : "2x"
11
+ },
12
+ {
13
+ "idiom" : "universal",
14
+ "scale" : "3x"
15
+ }
16
+ ],
17
+ "info" : {
18
+ "author" : "xcode",
19
+ "version" : 1
20
+ }
21
+ }
ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png ADDED
Binary file
ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json CHANGED
@@ -1,23 +1,23 @@
1
1
  {
2
2
  "images" : [
3
3
  {
4
- "idiom" : "universal",
5
4
  "filename" : "LaunchImage.png",
5
+ "idiom" : "universal",
6
6
  "scale" : "1x"
7
7
  },
8
8
  {
9
- "idiom" : "universal",
10
9
  "filename" : "[email protected]",
10
+ "idiom" : "universal",
11
11
  "scale" : "2x"
12
12
  },
13
13
  {
14
- "idiom" : "universal",
15
14
  "filename" : "[email protected]",
15
+ "idiom" : "universal",
16
16
  "scale" : "3x"
17
17
  }
18
18
  ],
19
19
  "info" : {
20
- "version" : 1,
21
- "author" : "xcode"
20
+ "author" : "xcode",
21
+ "version" : 1
22
22
  }
23
23
  }
ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png CHANGED
Binary file
ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected] CHANGED
Binary file
ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected] CHANGED
Binary file
ios/Runner/Base.lproj/LaunchScreen.storyboard CHANGED
@@ -16,13 +16,19 @@
16
16
  <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
17
17
  <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
18
18
  <subviews>
19
- <imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
20
- </imageView>
19
+ <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" image="LaunchBackground" translatesAutoresizingMaskIntoConstraints="NO" id="tWc-Dq-wcI"/>
20
+ <imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4"></imageView>
21
21
  </subviews>
22
22
  <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
23
23
  <constraints>
24
- <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
24
+ <constraint firstItem="YRO-k0-Ey4" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="3T2-ad-Qdv"/>
25
+ <constraint firstItem="tWc-Dq-wcI" firstAttribute="bottom" secondItem="Ze5-6b-2t3" secondAttribute="bottom" id="RPx-PI-7Xg"/>
26
+ <constraint firstItem="tWc-Dq-wcI" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="SdS-ul-q2q"/>
27
+ <constraint firstAttribute="trailing" secondItem="tWc-Dq-wcI" secondAttribute="trailing" id="Swv-Gf-Rwn"/>
28
+ <constraint firstAttribute="trailing" secondItem="YRO-k0-Ey4" secondAttribute="trailing" id="TQA-XW-tRk"/>
25
- <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
29
+ <constraint firstItem="YRO-k0-Ey4" firstAttribute="bottom" secondItem="Ze5-6b-2t3" secondAttribute="bottom" id="duK-uY-Gun"/>
30
+ <constraint firstItem="tWc-Dq-wcI" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="kV7-tw-vXt"/>
31
+ <constraint firstItem="YRO-k0-Ey4" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="xPn-NY-SIU"/>
26
32
  </constraints>
27
33
  </view>
28
34
  </viewController>
@@ -32,6 +38,7 @@
32
38
  </scene>
33
39
  </scenes>
34
40
  <resources>
35
- <image name="LaunchImage" width="168" height="185"/>
41
+ <image name="LaunchImage" width="512" height="512"/>
42
+ <image name="LaunchBackground" width="1" height="1"/>
36
43
  </resources>
37
44
  </document>
ios/Runner/Info.plist CHANGED
@@ -1,70 +1,72 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
3
  <plist version="1.0">
4
- <dict>
5
- <key>CADisableMinimumFrameDurationOnPhone</key>
6
- <true/>
7
- <key>CFBundleDevelopmentRegion</key>
8
- <string>$(DEVELOPMENT_LANGUAGE)</string>
9
- <key>CFBundleDisplayName</key>
10
- <string>Only Bible App</string>
11
- <key>CFBundleExecutable</key>
12
- <string>$(EXECUTABLE_NAME)</string>
13
- <key>CFBundleIdentifier</key>
14
- <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
15
- <key>CFBundleInfoDictionaryVersion</key>
16
- <string>6.0</string>
17
- <key>CFBundleName</key>
18
- <string>only_bible_app</string>
19
- <key>CFBundlePackageType</key>
20
- <string>APPL</string>
21
- <key>CFBundleShortVersionString</key>
22
- <string>$(FLUTTER_BUILD_NAME)</string>
23
- <key>CFBundleSignature</key>
24
- <string>????</string>
25
- <key>CFBundleVersion</key>
26
- <string>$(FLUTTER_BUILD_NUMBER)</string>
27
- <key>LSRequiresIPhoneOS</key>
28
- <true/>
29
- <key>UIApplicationSceneManifest</key>
30
4
  <dict>
31
- <key>UIApplicationSupportsMultipleScenes</key>
5
+ <key>CADisableMinimumFrameDurationOnPhone</key>
32
- <false/>
6
+ <true/>
7
+ <key>CFBundleDevelopmentRegion</key>
8
+ <string>$(DEVELOPMENT_LANGUAGE)</string>
9
+ <key>CFBundleDisplayName</key>
10
+ <string>Only Bible App</string>
11
+ <key>CFBundleExecutable</key>
12
+ <string>$(EXECUTABLE_NAME)</string>
13
+ <key>CFBundleIdentifier</key>
14
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
15
+ <key>CFBundleInfoDictionaryVersion</key>
16
+ <string>6.0</string>
17
+ <key>CFBundleName</key>
18
+ <string>only_bible_app</string>
19
+ <key>CFBundlePackageType</key>
20
+ <string>APPL</string>
21
+ <key>CFBundleShortVersionString</key>
22
+ <string>$(FLUTTER_BUILD_NAME)</string>
33
- <key>UISceneConfigurations</key>
23
+ <key>CFBundleSignature</key>
24
+ <string>????</string>
25
+ <key>CFBundleVersion</key>
26
+ <string>$(FLUTTER_BUILD_NUMBER)</string>
27
+ <key>LSRequiresIPhoneOS</key>
28
+ <true/>
29
+ <key>UIApplicationSceneManifest</key>
34
30
  <dict>
31
+ <key>UIApplicationSupportsMultipleScenes</key>
32
+ <false/>
33
+ <key>UISceneConfigurations</key>
34
+ <dict>
35
- <key>UIWindowSceneSessionRoleApplication</key>
35
+ <key>UIWindowSceneSessionRoleApplication</key>
36
- <array>
36
+ <array>
37
- <dict>
37
+ <dict>
38
- <key>UISceneClassName</key>
38
+ <key>UISceneClassName</key>
39
- <string>UIWindowScene</string>
39
+ <string>UIWindowScene</string>
40
- <key>UISceneConfigurationName</key>
40
+ <key>UISceneConfigurationName</key>
41
- <string>flutter</string>
41
+ <string>flutter</string>
42
- <key>UISceneDelegateClassName</key>
42
+ <key>UISceneDelegateClassName</key>
43
- <string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
43
+ <string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
44
- <key>UISceneStoryboardFile</key>
44
+ <key>UISceneStoryboardFile</key>
45
- <string>Main</string>
45
+ <string>Main</string>
46
- </dict>
46
+ </dict>
47
- </array>
47
+ </array>
48
+ </dict>
48
49
  </dict>
50
+ <key>UIApplicationSupportsIndirectInputEvents</key>
51
+ <true/>
52
+ <key>UILaunchStoryboardName</key>
53
+ <string>LaunchScreen</string>
54
+ <key>UIMainStoryboardFile</key>
55
+ <string>Main</string>
56
+ <key>UISupportedInterfaceOrientations</key>
57
+ <array>
58
+ <string>UIInterfaceOrientationPortrait</string>
59
+ <string>UIInterfaceOrientationLandscapeLeft</string>
60
+ <string>UIInterfaceOrientationLandscapeRight</string>
61
+ </array>
62
+ <key>UISupportedInterfaceOrientations~ipad</key>
63
+ <array>
64
+ <string>UIInterfaceOrientationPortrait</string>
65
+ <string>UIInterfaceOrientationPortraitUpsideDown</string>
66
+ <string>UIInterfaceOrientationLandscapeLeft</string>
67
+ <string>UIInterfaceOrientationLandscapeRight</string>
68
+ </array>
69
+ <key>UIStatusBarHidden</key>
70
+ <false/>
49
71
  </dict>
50
- <key>UIApplicationSupportsIndirectInputEvents</key>
51
- <true/>
52
- <key>UILaunchStoryboardName</key>
53
- <string>LaunchScreen</string>
54
- <key>UIMainStoryboardFile</key>
55
- <string>Main</string>
56
- <key>UISupportedInterfaceOrientations</key>
57
- <array>
58
- <string>UIInterfaceOrientationPortrait</string>
59
- <string>UIInterfaceOrientationLandscapeLeft</string>
60
- <string>UIInterfaceOrientationLandscapeRight</string>
61
- </array>
62
- <key>UISupportedInterfaceOrientations~ipad</key>
63
- <array>
64
- <string>UIInterfaceOrientationPortrait</string>
65
- <string>UIInterfaceOrientationPortraitUpsideDown</string>
66
- <string>UIInterfaceOrientationLandscapeLeft</string>
67
- <string>UIInterfaceOrientationLandscapeRight</string>
68
- </array>
69
- </dict>
70
72
  </plist>
lib/main.dart CHANGED
@@ -22,7 +22,6 @@ void main() async {
22
22
  initialState: initialState ?? const AppState(),
23
23
  persistor: persistor,
24
24
  );
25
- // await store.persistor.readState();
26
25
  // FlutterError.onError = (errorDetails) {
27
26
  // SchedulerBinding.instance.addPostFrameCallback((d) {
28
27
  // showReportError(
lib/theme.dart CHANGED
@@ -167,7 +167,7 @@ final lightTheme = ThemeData(
167
167
  letterSpacing: 0.5,
168
168
  ),
169
169
  labelMedium: TextStyle(
170
- fontSize: 12,
170
+ fontSize: 14,
171
171
  fontWeight: FontWeight.w700,
172
172
  color: lightColorScheme.primary,
173
173
  letterSpacing: 0,
lib/widgets/verses_view.dart CHANGED
@@ -1,4 +1,3 @@
1
- import "package:flutter/gestures.dart";
2
1
  import "package:flutter/material.dart";
3
2
  import "package:flutter_swipe_detector/flutter_swipe_detector.dart";
4
3
  import "package:only_bible_app/models.dart";
@@ -12,100 +11,59 @@ class VersesView extends StatelessWidget {
12
11
 
13
12
  const VersesView({super.key, required this.bible, required this.chapter});
14
13
 
14
+ void _onVerseTap(BuildContext context, Verse v) {
15
+ context.dispatch(SelectVerseAction(v));
16
+ if (context.state.selectedVerses.isNotEmpty) {
17
+ showActions(context, bible);
18
+ } else {
19
+ hideActions(context);
20
+ }
21
+ }
22
+
15
23
  @override
16
24
  Widget build(BuildContext context) {
25
+ final appState = context.state;
17
26
  final textStyle = DefaultTextStyle.of(context).style;
27
+ final theme = Theme.of(context).textTheme;
28
+ final baseStyle = appState.boldFont ? textStyle.copyWith(fontWeight: FontWeight.w500) : textStyle;
18
29
  return SwipeDetector(
19
- onSwipeLeft: (offset) {
20
- nextChapter(context, bible, chapter.book, chapter.index);
21
- },
22
- onSwipeRight: (offset) {
23
- previousChapter(context, bible, chapter.book, chapter.index);
30
+ onSwipeLeft: (offset) => nextChapter(context, bible, chapter.book, chapter.index),
31
+ onSwipeRight: (offset) => previousChapter(context, bible, chapter.book, chapter.index),
32
+ child: SingleChildScrollView(
24
- },
33
+ physics: const BouncingScrollPhysics(),
34
+ padding: const EdgeInsets.symmetric(horizontal: 20),
25
- child: Column(
35
+ child: Column(
36
+ crossAxisAlignment: CrossAxisAlignment.start,
26
- children: [
37
+ children: [
27
- Expanded(
28
- child: SingleChildScrollView(
38
+ for (final v in chapter.verses)
29
- physics: const BouncingScrollPhysics(),
30
- child: Padding(
39
+ Padding(
31
- padding: const EdgeInsets.only(left: 20, right: 20),
40
+ padding: const EdgeInsets.only(bottom: 4),
41
+ child: GestureDetector(
42
+ onTap: () => _onVerseTap(context, v),
43
+ behavior: HitTestBehavior.opaque,
32
- child: Column(
44
+ child: Text.rich(
45
+ TextSpan(
33
- mainAxisAlignment: MainAxisAlignment.start,
46
+ style: baseStyle,
34
- crossAxisAlignment: CrossAxisAlignment.start,
35
- children: [
47
+ children: [
36
- // const Padding(
37
- // padding: EdgeInsets.only(top: 0),
38
- // ),
39
- Align(
40
- alignment: Alignment.centerLeft,
48
+ if (v.heading != "")
41
- child: Text.rich(
49
+ TextSpan(
50
+ text: "${v.heading.replaceAll("<br>", "\n")}\n",
42
- textScaler: TextScaler.linear(
51
+ style: theme.labelLarge,
43
- 1.1 + context.state.textScale / 2,
44
- ),
52
+ ),
45
- textAlign: TextAlign.left,
53
+ TextSpan(text: "${v.index + 1} ", style: theme.labelMedium),
46
54
  TextSpan(
47
- style: context.state.boldFont
48
- ? textStyle.copyWith(
49
- fontWeight: FontWeight.w500,
50
- )
51
- : textStyle,
55
+ text: v.text,
52
- children: chapter.verses
53
- .map(
54
- (v) => [
55
- if (v.heading != "")
56
- TextSpan(
57
- text: "${v.heading.replaceAll("<br>", "\n")}\n",
58
- style: Theme.of(context).textTheme.labelLarge,
59
- ),
60
- WidgetSpan(
61
- child: Transform.translate(
62
- offset: const Offset(0, -2),
63
- child: Text(
64
- "${v.index + 1} ",
65
- style: Theme.of(context).textTheme.labelMedium,
66
- ),
67
- ),
68
- ),
69
- TextSpan(
70
- text: "${v.text}\n",
71
- style: context.state.getHighlightStyle(context, v, false),
56
+ style: appState.getHighlightStyle(context, v, false),
72
- recognizer: TapGestureRecognizer()
73
- ..onTap = () {
74
- context.dispatch(SelectVerseAction(v));
75
- if (context.state.selectedVerses.isNotEmpty) {
76
- showActions(context, bible);
77
- }
78
- if (context.state.selectedVerses.isEmpty) {
79
- hideActions(context);
80
- }
81
- },
82
- ),
83
- const WidgetSpan(
84
- child: Padding(
85
- padding: EdgeInsets.only(
86
- top: 16,
87
- bottom: 16,
88
- ),
89
- ),
90
- ),
91
- ],
92
- )
93
- .expand((element) => element)
94
- .toList(),
95
57
  ),
96
- ),
58
+ ],
97
- ),
98
- Padding(
99
- padding: EdgeInsets.only(
100
- bottom: context.state.selectedVerses.isNotEmpty ? 120 : 0,
101
- ),
102
59
  ),
60
+ textScaler: TextScaler.linear(1.1 + appState.textScale / 2),
103
- ],
61
+ ),
104
62
  ),
105
63
  ),
64
+ if (appState.selectedVerses.isNotEmpty) const SizedBox(height: 120),
65
+ ],
106
- ),
66
+ ),
107
- ),
108
- ],
109
67
  ),
110
68
  );
111
69
  }
web/index.html CHANGED
@@ -1,6 +1,4 @@
1
- <!DOCTYPE html>
1
+ <!DOCTYPE html><html><head>
2
- <html>
3
- <head>
4
2
  <!--
5
3
  If you are serving your web app in a path other than the root, change the
6
4
  href value below to reflect the base path you are serving from.
@@ -27,12 +25,83 @@
27
25
  <link rel="apple-touch-icon" href="icons/Icon-192.png">
28
26
 
29
27
  <!-- Favicon -->
30
- <link rel="icon" type="image/png" href="favicon.png"/>
28
+ <link rel="icon" type="image/png" href="favicon.png">
31
29
 
32
30
  <title>only_bible_app</title>
33
31
  <link rel="manifest" href="manifest.json">
32
+ <style id="splash-screen-style">
33
+ html {
34
+ height: 100%
35
+ }
36
+
37
+ body {
38
+ margin: 0;
39
+ min-height: 100%;
40
+ background-color: #FFFFFF;
41
+ background-size: 100% 100%;
42
+ }
43
+
44
+ .center {
45
+ margin: 0;
46
+ position: absolute;
47
+ top: 50%;
48
+ left: 50%;
49
+ -ms-transform: translate(-50%, -50%);
50
+ transform: translate(-50%, -50%);
51
+ }
52
+
53
+ .contain {
54
+ display:block;
55
+ width:100%; height:100%;
56
+ object-fit: contain;
57
+ }
58
+
59
+ .stretch {
60
+ display:block;
61
+ width:100%; height:100%;
62
+ }
63
+
64
+ .cover {
65
+ display:block;
66
+ width:100%; height:100%;
67
+ object-fit: cover;
68
+ }
69
+
70
+ .bottom {
71
+ position: absolute;
72
+ bottom: 0;
73
+ left: 50%;
74
+ -ms-transform: translate(-50%, 0);
75
+ transform: translate(-50%, 0);
76
+ }
77
+
78
+ .bottomLeft {
79
+ position: absolute;
80
+ bottom: 0;
81
+ left: 0;
82
+ }
83
+
84
+ .bottomRight {
85
+ position: absolute;
86
+ bottom: 0;
87
+ right: 0;
88
+ }
89
+ </style>
90
+ <script id="splash-screen-script">
91
+ function removeSplashFromWeb() {
92
+ document.getElementById("splash")?.remove();
93
+ document.getElementById("splash-branding")?.remove();
94
+ document.body.style.background = "transparent";
95
+ }
96
+ </script>
97
+ <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
34
98
  </head>
35
99
  <body>
100
+ <picture id="splash">
101
+ <source srcset="splash/img/light-1x.png 1x, splash/img/light-2x.png 2x, splash/img/light-3x.png 3x, splash/img/light-4x.png 4x" media="(prefers-color-scheme: light)">
102
+ <source srcset="splash/img/dark-1x.png 1x, splash/img/dark-2x.png 2x, splash/img/dark-3x.png 3x, splash/img/dark-4x.png 4x" media="(prefers-color-scheme: dark)">
103
+ <img class="center" aria-hidden="true" src="splash/img/light-1x.png" alt="">
104
+ </picture>
36
105
  <!--
37
106
  You can customize the "flutter_bootstrap.js" script.
38
107
  This is useful to provide a custom configuration to the Flutter loader
@@ -41,6 +110,7 @@
41
110
  For more details:
42
111
  * https://docs.flutter.dev/platform-integration/web/initialization
43
112
  -->
44
- <script src="flutter_bootstrap.js" async></script>
113
+ <script src="flutter_bootstrap.js" async=""></script>
114
+
115
+
45
- </body>
116
+ </body></html>
46
- </html>
web/splash/img/dark-1x.png ADDED
Binary file
web/splash/img/dark-2x.png ADDED
Binary file
web/splash/img/dark-3x.png ADDED
Binary file
web/splash/img/dark-4x.png ADDED
Binary file
web/splash/img/light-1x.png ADDED
Binary file
web/splash/img/light-2x.png ADDED
Binary file
web/splash/img/light-3x.png ADDED
Binary file
web/splash/img/light-4x.png ADDED
Binary file