mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2024-11-19 15:19:14 +00:00
feat: Use Material 3 animation curves
This commit is contained in:
parent
6656635785
commit
0df9d2ac27
|
@ -38,7 +38,7 @@ class SegmentedButtons extends StatelessWidget {
|
|||
opacity: isSelected[index] ? 1 : 0,
|
||||
child: AnimatedScale(
|
||||
duration: const Duration(milliseconds: 200),
|
||||
curve: Curves.easeInOut,
|
||||
curve: Curves.easeInOutCubicEmphasized,
|
||||
alignment: Alignment.centerLeft,
|
||||
scale: isSelected[index] ? 1 : 0,
|
||||
child: Icon(
|
||||
|
@ -53,7 +53,7 @@ class SegmentedButtons extends StatelessWidget {
|
|||
? const EdgeInsets.only(left: 24)
|
||||
: EdgeInsets.zero,
|
||||
duration: const Duration(milliseconds: 200),
|
||||
curve: Curves.easeInOut,
|
||||
curve: Curves.easeInOutCubicEmphasized,
|
||||
child: Text(
|
||||
title,
|
||||
style: Theme.of(context).textTheme.labelLarge,
|
||||
|
|
|
@ -27,14 +27,14 @@ class BrandLinearIndicator extends StatelessWidget {
|
|||
alignment: Alignment.centerLeft,
|
||||
child: AnimatedSlide(
|
||||
duration: const Duration(milliseconds: 400),
|
||||
curve: Curves.easeInOut,
|
||||
curve: Curves.easeInOutCubicEmphasized,
|
||||
offset: Offset(
|
||||
-(1 - value),
|
||||
0,
|
||||
),
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 400),
|
||||
curve: Curves.easeInOut,
|
||||
curve: Curves.easeInOutCubicEmphasized,
|
||||
width: constraints.maxWidth,
|
||||
decoration: BoxDecoration(
|
||||
color: color,
|
||||
|
|
|
@ -190,9 +190,9 @@ class BottomBar extends StatelessWidget {
|
|||
print(prevActiveIndex);
|
||||
|
||||
return AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 200),
|
||||
duration: const Duration(milliseconds: 500),
|
||||
height: hidden ? 0 : 80,
|
||||
curve: Curves.easeInOut,
|
||||
curve: Curves.easeInOutCubicEmphasized,
|
||||
clipBehavior: Clip.antiAlias,
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).scaffoldBackgroundColor,
|
||||
|
|
|
@ -76,7 +76,7 @@ class _OnboardingPageState extends State<OnboardingPage> {
|
|||
pageController.animateToPage(
|
||||
1,
|
||||
duration: const Duration(milliseconds: 300),
|
||||
curve: Curves.easeIn,
|
||||
curve: Curves.easeInOutCubicEmphasized,
|
||||
);
|
||||
},
|
||||
text: 'basis.next'.tr(),
|
||||
|
|
|
@ -53,25 +53,25 @@ Widget fadeThroughTransition(
|
|||
usesPathAsKey: true,
|
||||
initial: true,
|
||||
transitionsBuilder: fadeThroughTransition,
|
||||
durationInMilliseconds: 200,
|
||||
durationInMilliseconds: 400,
|
||||
),
|
||||
CustomRoute(
|
||||
page: ServicesPage,
|
||||
usesPathAsKey: true,
|
||||
transitionsBuilder: fadeThroughTransition,
|
||||
durationInMilliseconds: 200,
|
||||
durationInMilliseconds: 400,
|
||||
),
|
||||
CustomRoute(
|
||||
page: UsersPage,
|
||||
usesPathAsKey: true,
|
||||
transitionsBuilder: fadeThroughTransition,
|
||||
durationInMilliseconds: 200,
|
||||
durationInMilliseconds: 400,
|
||||
),
|
||||
CustomRoute(
|
||||
page: MorePage,
|
||||
usesPathAsKey: true,
|
||||
transitionsBuilder: fadeThroughTransition,
|
||||
durationInMilliseconds: 200,
|
||||
durationInMilliseconds: 400,
|
||||
),
|
||||
AutoRoute(page: AppSettingsPage),
|
||||
AutoRoute(page: UserDetailsPage),
|
||||
|
|
|
@ -64,7 +64,7 @@ class _$RootRouter extends RootStackRouter {
|
|||
routeData: routeData,
|
||||
child: const ProvidersPage(),
|
||||
transitionsBuilder: fadeThroughTransition,
|
||||
durationInMilliseconds: 200,
|
||||
durationInMilliseconds: 400,
|
||||
opaque: true,
|
||||
barrierDismissible: false,
|
||||
);
|
||||
|
@ -74,7 +74,7 @@ class _$RootRouter extends RootStackRouter {
|
|||
routeData: routeData,
|
||||
child: const ServicesPage(),
|
||||
transitionsBuilder: fadeThroughTransition,
|
||||
durationInMilliseconds: 200,
|
||||
durationInMilliseconds: 400,
|
||||
opaque: true,
|
||||
barrierDismissible: false,
|
||||
);
|
||||
|
@ -84,7 +84,7 @@ class _$RootRouter extends RootStackRouter {
|
|||
routeData: routeData,
|
||||
child: const UsersPage(),
|
||||
transitionsBuilder: fadeThroughTransition,
|
||||
durationInMilliseconds: 200,
|
||||
durationInMilliseconds: 400,
|
||||
opaque: true,
|
||||
barrierDismissible: false,
|
||||
);
|
||||
|
@ -94,7 +94,7 @@ class _$RootRouter extends RootStackRouter {
|
|||
routeData: routeData,
|
||||
child: const MorePage(),
|
||||
transitionsBuilder: fadeThroughTransition,
|
||||
durationInMilliseconds: 200,
|
||||
durationInMilliseconds: 400,
|
||||
opaque: true,
|
||||
barrierDismissible: false,
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue