Closed koji-1009 closed 1 year ago
I'd like to try this, but i'm not sure how to implement this.
Applying animation to BranchContainer
is not enough to apply animation to AboutUsRoute
and LegalNoticesRoute
because they belongs to the LicensesRoute
.
should i apply animations them? if so, is it good way to wrap them with CustomTransitionPage indivisually?
class AboutUsRoute extends GoRouteData {
const AboutUsRoute();
static const path = 'about-us';
static final $parentNavigatorKey = rootNavigatorKey;
@override
Page<void> buildPage(BuildContext context, GoRouterState state) {
return CustomTransitionPage<void>(
key: state.pageKey,
child: const AboutUsPage(),
transitionsBuilder: (context, animation, animation2, child) => FadeTransition(
opacity: animation,
child: child,
),
);
}
}
Hi @HiroyukiTamura Thanks for your interest!
The AboutUsRoute
and LegalNoticesRoute
are defined as MaterialPage and are already animated on screen transition. For this reason, they are not the target of this Issue.
This Issue targets animations between pages switched by NavigationBar, Drawer, and NavigationRails. Specifically, the following TODO comment is described in the following section, and there is code in go_router_builder's example that can be used as a reference.
Sorry for the lack of description in the Issue.
Is your feature request related to a problem? Please describe.
142 の実装では画面切り替え時のアニメーションが実装されていないので、切り替えアニメーションを追加する。
Describe the solution you'd like
AnimatedOpacity
によるアニメーションの実現。 https://api.flutter.dev/flutter/widgets/AnimatedOpacity-class.htmlDescribe alternatives you've considered 実装時に提案があれば歓迎します。
Additional context ~#142 がマージされたら着手可能。~