~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.


de66acfb pyrossh

2 years ago
Fix settings issues
lib/theme.dart CHANGED
@@ -20,8 +20,8 @@ final lightTheme = ThemeData(
20
20
  ),
21
21
  bottomSheetTheme: const BottomSheetThemeData(
22
22
  elevation: 10,
23
+ backgroundColor: Color(0xFFF2F2F7),
23
24
  shadowColor: Colors.black,
24
- backgroundColor: Colors.white,
25
25
  surfaceTintColor: Colors.white,
26
26
  clipBehavior: Clip.antiAliasWithSaveLayer,
27
27
  shape: RoundedRectangleBorder(
@@ -121,9 +121,9 @@ final darkTheme = ThemeData(
121
121
  backgroundColor: const Color(0xFF1F1F22),
122
122
  ),
123
123
  bottomSheetTheme: lightTheme.bottomSheetTheme.copyWith(
124
- shadowColor: const Color(0xFF4B3D60),
125
- backgroundColor: const Color(0xFF26242C),
124
+ backgroundColor: const Color(0xFF141415),
125
+ shadowColor: Colors.white,
126
- surfaceTintColor: const Color(0xAA5D4979),
126
+ surfaceTintColor: const Color(0xFF141415),
127
127
  ),
128
128
  dialogTheme: const DialogTheme(
129
129
  elevation: 1,
lib/widgets/more_button.dart CHANGED
@@ -58,6 +58,7 @@ class _MoreButtonState extends State<MoreButton> {
58
58
  context: context,
59
59
  isDismissible: true,
60
60
  enableDrag: true,
61
+ showDragHandle: true,
61
62
  useSafeArea: true,
62
63
  builder: (context) => const SettingsSheet(),
63
64
  );
lib/widgets/settings_sheet.dart CHANGED
@@ -13,90 +13,82 @@ class SettingsSheet extends StatelessWidget {
13
13
  final modeIcon = model.darkMode ? Icons.dark_mode : Icons.light_mode;
14
14
  final modeIconColor = model.darkMode ? const Color(0xFF59EEFF) : const Color(0xFFE5B347);
15
15
  final iconColor = Theme.of(context).textTheme.bodyMedium!.color;
16
- return ColoredBox(
17
- color: model.darkMode ? const Color(0xFF141415) : const Color(0xFFF2F2F7),
18
- child: SettingsList(
16
+ return SettingsList(
19
- contentPadding: const EdgeInsets.only(top: 20),
17
+ contentPadding: EdgeInsets.zero,
18
+ platform: DevicePlatform.iOS,
20
- lightTheme: const SettingsThemeData(
19
+ lightTheme: const SettingsThemeData(
21
- settingsListBackground: Color(0xFFF2F2F7),
20
+ settingsListBackground: Color(0xFFF2F2F7),
22
- ),
21
+ ),
23
- darkTheme: const SettingsThemeData(
22
+ darkTheme: const SettingsThemeData(
24
- settingsListBackground: Color(0xFF141415),
23
+ settingsListBackground: Color(0xFF141415),
25
- ),
24
+ ),
26
- sections: [
25
+ sections: [
27
- SettingsSection(
26
+ SettingsSection(
28
- margin: const EdgeInsetsDirectional.symmetric(horizontal: 20),
27
+ margin: const EdgeInsetsDirectional.symmetric(horizontal: 20),
29
- tiles: [
30
- SettingsTile(
28
+ title: Container(
29
+ alignment: Alignment.topLeft,
31
- title: const Text(
30
+ child: const Text(
32
- "Settings",
31
+ "Settings",
33
- style: TextStyle(
32
+ style: TextStyle(
34
- fontSize: 16,
33
+ fontSize: 16,
35
- fontWeight: FontWeight.w700,
34
+ fontWeight: FontWeight.w500,
36
- ),
37
- ),
38
- trailing: IconButton(
39
- padding: EdgeInsets.zero,
40
- icon: Icon(Icons.close, color: iconColor),
41
- onPressed: () {
42
- Navigator.of(context).pop();
43
- },
44
- ),
45
- ),
46
- SettingsTile.navigation(
47
- leading: const Icon(Icons.language, color: Colors.green),
48
- title: const Text("Language"),
49
- value: const Text("English"),
50
- ),
51
- SettingsTile.navigation(
52
- leading: const Icon(Icons.book_outlined, color: Colors.blueAccent),
53
- title: const Text("Bible"),
54
- value: Text(selectedBible.name),
55
- onPressed: (c) {
56
- Navigator.of(c).pushReplacement(
57
- createNoTransitionPageRoute(
58
- const BibleSelectScreen(),
59
- ),
60
- );
61
- return null;
62
- },
63
- ),
64
- SettingsTile.switchTile(
65
- onToggle: (value) {
66
- model.toggleMode();
67
- },
68
- initialValue: model.darkMode,
69
- leading: Icon(modeIcon, color: modeIconColor),
70
- title: const Text("Dark mode"),
71
- ),
72
- SettingsTile.switchTile(
73
- onToggle: (value) {
74
- model.toggleBold();
75
- },
76
- initialValue: model.fontBold,
77
- leading: Icon(Icons.format_bold, color: iconColor),
78
- title: const Text("Bold font"),
79
35
  ),
36
+ ),
37
+ ),
38
+ tiles: [
39
+ SettingsTile.navigation(
40
+ leading: const Icon(Icons.language, color: Colors.green),
41
+ title: const Text("Language"),
42
+ value: const Text("English"),
43
+ ),
44
+ SettingsTile.navigation(
45
+ leading: const Icon(Icons.book_outlined, color: Colors.blueAccent),
46
+ title: const Text("Bible"),
47
+ value: Text(selectedBible.name),
48
+ onPressed: (c) {
49
+ Navigator.of(c).pushReplacement(
50
+ createNoTransitionPageRoute(
51
+ const BibleSelectScreen(),
52
+ ),
53
+ );
54
+ return null;
55
+ },
56
+ ),
57
+ SettingsTile.switchTile(
58
+ onToggle: (value) {
59
+ model.toggleMode();
60
+ },
61
+ initialValue: model.darkMode,
62
+ leading: Icon(modeIcon, color: modeIconColor),
63
+ title: const Text("Dark mode"),
64
+ ),
65
+ SettingsTile.switchTile(
66
+ onToggle: (value) {
67
+ model.toggleBold();
68
+ },
69
+ initialValue: model.fontBold,
70
+ leading: Icon(Icons.format_bold, color: iconColor),
71
+ title: const Text("Bold font"),
72
+ ),
80
- SettingsTile(
73
+ SettingsTile(
81
- title: const Text("Increase font size"),
74
+ title: const Text("Increase font size"),
82
- leading: Icon(Icons.font_download, color: iconColor),
75
+ leading: Icon(Icons.font_download, color: iconColor),
83
- trailing: IconButton(
76
+ trailing: IconButton(
84
- onPressed: model.increaseFont,
77
+ onPressed: model.increaseFont,
85
- icon: const Icon(Icons.add_circle_outline, size: 32, color: Colors.redAccent),
78
+ icon: const Icon(Icons.add_circle_outline, size: 32, color: Colors.redAccent),
86
- ),
87
79
  ),
80
+ ),
88
- SettingsTile(
81
+ SettingsTile(
89
- title: const Text("Decrease font size"),
82
+ title: const Text("Decrease font size"),
90
- leading: Icon(Icons.font_download, color: iconColor),
83
+ leading: Icon(Icons.font_download, color: iconColor),
91
- trailing: IconButton(
84
+ trailing: IconButton(
92
- onPressed: model.decreaseFont,
85
+ onPressed: model.decreaseFont,
93
- icon: const Icon(Icons.remove_circle_outline, size: 32, color: Colors.blueAccent),
86
+ icon: const Icon(Icons.remove_circle_outline, size: 32, color: Colors.blueAccent),
94
- ),
95
87
  ),
88
+ ),
96
- ],
89
+ ],
97
- ),
90
+ ),
98
- ],
91
+ ],
99
- ),
100
92
  );
101
93
  }
102
94
  }