Figma 설명 프레임 반영 — 로그인·온보딩·스플래시 · HOME · GALAXY · 퀘스트·이클립스·알림
This commit is contained in:
@@ -176,3 +176,17 @@ Future<void> showAlertDialog(
|
||||
confirmLabel: confirmLabel ?? context.l10n.commonConfirm,
|
||||
),
|
||||
);
|
||||
|
||||
/// 아래에서 올라오고 닫으면 아래로 내려가는 전체 화면 — Figma 설명 「닫기 버튼 클릭 시, 하단
|
||||
/// move out 페이지 종료」(`516:87382` 성운 생성 · `516:87457` 행성 생성 · `516:88164` 이클립스 상세).
|
||||
/// 안드로이드 기본 전환(확대)과 iOS 기본 전환(옆으로)이 모두 이 동작이 아니라 따로 둔다.
|
||||
Route<T> slideUpRoute<T>(WidgetBuilder builder) => PageRouteBuilder<T>(
|
||||
pageBuilder: (context, _, _) => builder(context),
|
||||
transitionsBuilder: (_, animation, _, child) => SlideTransition(
|
||||
position: Tween(
|
||||
begin: const Offset(0, 1),
|
||||
end: Offset.zero,
|
||||
).chain(CurveTween(curve: Curves.easeOutCubic)).animate(animation),
|
||||
child: child,
|
||||
),
|
||||
);
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// 아래에서 올라와 아래로 닫히는 전체 화면 — Figma 설명 프레임의 「닫기 버튼 클릭 시, 하단 move out
|
||||
/// 페이지 종료 후 이전 화면 이동」(퀘스트 생성 `523:18123` · 위치 선택 `523:18207` · 신고하기 `548:21389`
|
||||
/// · 이클립스 상세 `516:88158`).
|
||||
///
|
||||
/// `MaterialPageRoute(fullscreenDialog: true)` 는 iOS 에서만 아래로 내려간다(Android 는 기본 전환).
|
||||
/// 두 플랫폼 모두 같은 방향으로 움직이게 전환만 바꾼다.
|
||||
class SheetRoute<T> extends MaterialPageRoute<T> {
|
||||
SheetRoute({required super.builder}) : super(fullscreenDialog: true);
|
||||
|
||||
@override
|
||||
Widget buildTransitions(
|
||||
BuildContext context,
|
||||
Animation<double> animation,
|
||||
Animation<double> secondaryAnimation,
|
||||
Widget child,
|
||||
) => SlideTransition(
|
||||
position: animation.drive(
|
||||
Tween(begin: const Offset(0, 1), end: Offset.zero)
|
||||
.chain(CurveTween(curve: Curves.easeOutCubic)),
|
||||
),
|
||||
child: child,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user