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


ccdb6028 pyrossh

2 years ago
fix header and slide
Files changed (2) hide show
  1. lib/state.dart +10 -1
  2. lib/widgets/header.dart +1 -1
lib/state.dart CHANGED
@@ -118,7 +118,16 @@ createSlideRoute({required BuildContext context, TextDirection? slideDir, requir
118
118
  }
119
119
 
120
120
  navigateBookChapter(BuildContext context, int book, int chapter, bool noAnim) {
121
+ print("${bookIndex.value} ${book} ${chapterIndex.value} ${chapter}");
122
+ var slideDir = TextDirection.ltr;
123
+ if (book > bookIndex.value) {
124
+ slideDir = TextDirection.ltr;
125
+ } else if (bookIndex.value > book) {
126
+ slideDir = TextDirection.rtl;
127
+ } else if (chapterIndex.value > chapter) {
128
+ slideDir = TextDirection.rtl;
129
+ }
121
- final slideDir = bookIndex.value > book || chapterIndex.value > chapter ? TextDirection.rtl : TextDirection.ltr;
130
+ // final slideDir = book > bookIndex.value || ? TextDirection.rtl : TextDirection.ltr;
122
131
  // TODO: add bible param here maybe
123
132
  // route: /bible/book/chapter
124
133
  bookIndex.value = book;
lib/widgets/header.dart CHANGED
@@ -89,7 +89,7 @@ class Header extends StatelessWidget {
89
89
  ),
90
90
  ],
91
91
  ),
92
- const Divider(height: 0),
92
+ const Divider(height: 0, endIndent: 5),
93
93
  ],
94
94
  ));
95
95
  }