0
내 탐색기에서 애니메이션을 사용자 지정하려고합니다. 내 현재 경로 모양은 다음과 같습니다.Flutter - 사용자 지정 경로 전환 결과 검은 색 화면이 나타납니다.
class HelpRoute<T> extends MaterialPageRoute<T> {
HelpRoute({
WidgetBuilder builder,
}): super(builder: builder);
@override
Widget buildTransitions(BuildContext context,
Animation<double> animation,
Animation<double> secondaryAnimation,
Widget child)
{
if (settings.isInitialRoute)
return child;
return new SlideTransition(
position: new FractionalOffsetTween(
begin: FractionalOffset.topRight,
end: FractionalOffset.topLeft,
)
.animate(
new CurvedAnimation(
parent: animation,
curve: Curves.ease,
)
),
child: child,
);
}
@override Duration get transitionDuration => const Duration(milliseconds: 400);
}
그리고 완전히 오른쪽에서 왼쪽으로 페이드 인합니다. 하지만 지금은 왼쪽에서 오른쪽으로 전환하고 싶습니다. 그리고 내가 시작을 왼쪽으로 바 꾸었 으면 왼쪽으로 끝나고 오른쪽으로 끝내면 오른쪽으로 가면 검은 스크린으로 끝납니다.
내가 할 수있는 또 다른 옵션이 있습니까? 미리 감사드립니다.
와우, 멋진 작품! 감사. 내 얼굴이 흐릿 해져 오른쪽으로 향하고 오른쪽에있는 것처럼 appbar의 표준 화살표를 어떻게 바꿀 수 있는지 알고 있습니까? – OhMad
AppBar에 대해이 인수를 사용하십시오. 주요 : 새로운 컨테이너(), 작업을 : [ 새로운 IconButton ( 아이콘 : 새로운 아이콘 ( Theme.of (컨텍스트) .platform == TargetPlatform.iOS Icons.arrow_forward_ios : Icons.arrow_forward), onPressed :() { Navigator.pop (context); }, ) –
대단히 감사합니다. – OhMad