mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2025-05-11 13:05:37 +02:00
fix: add animations and fix some UI incoherences
This commit is contained in:
parent
596d4f0def
commit
a580375078
16 changed files with 153 additions and 122 deletions
|
@ -1,3 +1,4 @@
|
|||
import 'package:animations/animations.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_i18n/flutter_i18n.dart';
|
||||
// ignore: depend_on_referenced_packages
|
||||
|
@ -89,7 +90,21 @@ class Navigation extends StatelessWidget {
|
|||
return ViewModelBuilder<MainViewModel>.reactive(
|
||||
viewModelBuilder: () => locator<MainViewModel>(),
|
||||
builder: (context, model, child) => Scaffold(
|
||||
body: getViewForIndex(model.currentIndex),
|
||||
body: PageTransitionSwitcher(
|
||||
duration: const Duration(milliseconds: 400),
|
||||
transitionBuilder: (
|
||||
Widget child,
|
||||
Animation<double> animation,
|
||||
Animation<double> secondaryAnimation,
|
||||
) {
|
||||
return FadeThroughTransition(
|
||||
animation: animation,
|
||||
secondaryAnimation: secondaryAnimation,
|
||||
child: child,
|
||||
);
|
||||
},
|
||||
child: getViewForIndex(model.currentIndex),
|
||||
),
|
||||
bottomNavigationBar: NavigationBar(
|
||||
onDestinationSelected: model.setIndex,
|
||||
selectedIndex: model.currentIndex,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue