Skip to content

Commit

Permalink
wrap up
Browse files Browse the repository at this point in the history
  • Loading branch information
anandnet committed Jan 11, 2024
1 parent d4635ef commit 3b6a6fb
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 13 deletions.
1 change: 1 addition & 0 deletions lib/services/downloader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ class Downloader extends GetxService {
final thumbnailPath =
"${settingsScreenController.supportDirPath}/thumbnails/${song.id}.png";
await Dio().downloadUri(song.artUri!, thumbnailPath);
// ignore: empty_catches
} catch (e) {}

Hive.box("SongDownloads").put(song.id, songJson);
Expand Down
21 changes: 10 additions & 11 deletions lib/ui/screens/Home/home_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ class HomeScreen extends StatelessWidget {

return Scaffold(
floatingActionButton: Obx(
() => homeScreenController.tabIndex.value == 0 ||
homeScreenController.tabIndex.value == 2
() => (homeScreenController.tabIndex.value == 0 ||
homeScreenController.tabIndex.value == 2) &&
settingsScreenController.isBottomNavBarEnabled.isFalse
? Obx(
() => Padding(
padding: EdgeInsets.only(
Expand Down Expand Up @@ -80,15 +81,13 @@ class HomeScreen extends StatelessWidget {
//const VerticalDivider(thickness: 1, width: 2),
Expanded(
child: Obx(() => AnimatedScreenTransition(
resverse: homeScreenController.reverseAnimationtransiton,
horizontalTransition: settingsScreenController
.isBottomNavBarEnabled.isTrue,
child: Center(
key: ValueKey<int>(
homeScreenController.tabIndex.value),
child: const Body(),
))
),
resverse: homeScreenController.reverseAnimationtransiton,
horizontalTransition:
settingsScreenController.isBottomNavBarEnabled.isTrue,
child: Center(
key: ValueKey<int>(homeScreenController.tabIndex.value),
child: const Body(),
))),
),
],
),
Expand Down
1 change: 1 addition & 0 deletions lib/ui/screens/Home/home_screen_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ class HomeScreenController extends GetxController {
QuickPicks(List<MediaItem>.from(value[0]["contents"]));
Hive.box("AppPrefs").put("recentSongId", songId);
}
// ignore: empty_catches
} catch (e) {}
}
}
Expand Down
1 change: 1 addition & 0 deletions lib/ui/screens/Settings/settings_screen_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ class SettingsScreenController extends GetxController {
if (await tempImgDir.exists()) {
await tempImgDir.delete(recursive: true);
}
// ignore: empty_catches
} catch (e) {}
}

Expand Down
5 changes: 3 additions & 2 deletions lib/ui/widgets/animated_screen_transition.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,13 @@ class AnimatedScreenTransition extends StatelessWidget {
: Tween<Offset>(begin: const Offset(0, -1), end: Offset.zero);
}
return PageTransitionSwitcher(
duration: const Duration(milliseconds: 450),
duration: horizontalTransition
? const Duration(milliseconds: 400)
: const Duration(milliseconds: 450),
transitionBuilder: (child, primaryAnimation, secondaryAnimation) {
return DualTransitionBuilder(
animation: primaryAnimation,
forwardBuilder: (context, animation, child) => SlideTransition(
transformHitTests: true,
position: forwardTween.animate(primaryAnimation),
child: child,
),
Expand Down

0 comments on commit 3b6a6fb

Please sign in to comment.