1차 보완(0.1.1+14) 내용 합치기
This commit is contained in:
@@ -2,17 +2,24 @@ import 'package:flutter/material.dart';
|
||||
|
||||
import '../../core/i18n/app_locale.dart';
|
||||
import '../../core/theme/tokens.dart';
|
||||
import '../../core/ui/app_dialog.dart';
|
||||
|
||||
/// 회원가입 약관 — Figma `179:24230`(미동의) · `179:24324`(전체 동의).
|
||||
///
|
||||
/// 필수 4항을 모두 체크해야 「완료」가 켜진다. 완료하면 동의한 항목 키([signupTermKeys] 중)를
|
||||
/// 필수 항목을 모두 체크해야 「완료」가 켜진다. 완료하면 동의한 항목 키([signupTermKeys] 중)를
|
||||
/// 돌려준다 — 가입 모드([SimpleLoginScreen])는 `pop` 결과로, 온보딩은 [onAgreed] 로 받는다.
|
||||
/// 서버(`fnSignupConsent`)가 같은 필수 목록을 다시 검사하고 항목별 동의 행을 남긴다.
|
||||
///
|
||||
/// 필수 항목은 Figma 의 서비스 · 위치기반 · 만 14세에 개인정보 처리방침을 더했다(10/3 통합회신
|
||||
/// 3절 4 「이용약관 · 개인정보처리방침 문구 제공」). 구성은 해석 확인 요청 E-Q1 회신 대기다.
|
||||
/// 약관 본문은 발주사 실서비스 문구를 받기 전까지 시안의 자리 표시 문구다 — 받으면 [_body] 와
|
||||
/// [signupTermsVersion] 을 함께 바꾼다(동의 기록에 버전이 남는다).
|
||||
/// 항목은 통합검토회신 v2.3 **Q-E1** · 1차 검수 회신서 **R02** 를 따른다(공통 기준 2항 — Figma 의
|
||||
/// 과거 구성보다 확정 회신이 우선).
|
||||
/// - 필수: 서비스 이용약관 · 개인정보 수집·이용 동의 · 만 14세 이상.
|
||||
/// - 선택: 마케팅 수신(기본 OFF).
|
||||
/// - **위치기반 서비스 약관은 여기서 받지 않는다** — Figma 에는 있으나 위치기능 최초 사용 직전에
|
||||
/// 따로 받는다(`features/quest/location_consent.dart` 의 `ensureLocationConsent`).
|
||||
/// - 개인정보처리방침은 **동의 항목이 아니라 고지**다 — 체크 칸 없이 하단 버튼 위에 안내와 보기 링크만 둔다.
|
||||
///
|
||||
/// 약관 본문은 발주사 실서비스 문구를 받기 전까지 시안의 자리 표시 문구다 — 받으면
|
||||
/// [termsPlaceholderBody] · l10n `terms*Body` 와 [signupTermsVersion] 을 함께 바꾼다(동의 기록에 버전이 남는다).
|
||||
class TermsScreen extends StatefulWidget {
|
||||
const TermsScreen({
|
||||
super.key,
|
||||
@@ -39,27 +46,33 @@ const signupTermsVersion = 'draft-1';
|
||||
List<String> get signupTermKeys => [for (final t in _Term.values) t.name];
|
||||
|
||||
enum _Term {
|
||||
service(required: true, body: true),
|
||||
privacy(required: true, body: true),
|
||||
location(required: true, body: true),
|
||||
age(required: true, body: false),
|
||||
marketing(required: false, body: true);
|
||||
service(required: true),
|
||||
privacy(required: true),
|
||||
age(required: true),
|
||||
marketing(required: false);
|
||||
|
||||
const _Term({required this.required, required this.body});
|
||||
const _Term({required this.required});
|
||||
|
||||
final bool required;
|
||||
final bool body;
|
||||
|
||||
String label(AppLocalizations l10n) => switch (this) {
|
||||
service => l10n.termsService,
|
||||
privacy => l10n.termsPrivacy,
|
||||
location => l10n.termsLocation,
|
||||
age => l10n.termsAge,
|
||||
marketing => l10n.termsMarketing,
|
||||
};
|
||||
|
||||
/// 항목 아래에 보이는 본문 — 항목마다 제목이 다르다. 만 14세는 본문 없이 체크 줄만 그린다.
|
||||
String? body(AppLocalizations l10n) => switch (this) {
|
||||
service => termsPlaceholderBody,
|
||||
privacy => l10n.termsPrivacyBody,
|
||||
age => null,
|
||||
marketing => l10n.termsMarketingBody,
|
||||
};
|
||||
}
|
||||
|
||||
const _body =
|
||||
/// 서비스 이용약관 본문 자리 표시 문구(시안 문구). 다른 약관 · 방침은 각자의 자리 표시 문구(l10n)를 쓴다.
|
||||
const termsPlaceholderBody =
|
||||
'FANUZU 서비스 이용약관\n\n제1조 (적용범위)\n서비스 이용약관에 대한 더미 텍스트 입니다.\n'
|
||||
'추후 작성해주시기 바랍니다. 서비스 이용약관에 대한 더미 텍스트 입니다.';
|
||||
|
||||
@@ -140,7 +153,43 @@ class _TermsScreenState extends State<TermsScreen> {
|
||||
bottomNavigationBar: SafeArea(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(AppSpace.s4),
|
||||
child: _termsButtons(context),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
// 개인정보처리방침 — 동의 항목과 구분한 고지(Q-E1). 체크 칸이 없고 「보기」로 본문을 연다.
|
||||
// 목록 끝에 두면 iPhone 11 높이에서 하단 버튼 뒤로 가려지므로 버튼 위에 고정한다.
|
||||
Padding(
|
||||
key: const ValueKey('privacy-policy-notice'),
|
||||
padding: const EdgeInsets.only(bottom: AppSpace.s2),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
context.l10n.termsPrivacyPolicyNotice,
|
||||
style: const TextStyle(
|
||||
fontFamily: AppFonts.display,
|
||||
fontFamilyFallback: [AppFonts.body],
|
||||
fontSize: 12,
|
||||
height: 1.36,
|
||||
color: AppColors.onCosmicMuted,
|
||||
),
|
||||
),
|
||||
),
|
||||
TextButton(
|
||||
key: const ValueKey('privacy-policy-link'),
|
||||
onPressed: () => showAlertDialog(
|
||||
context,
|
||||
context.l10n.termsPrivacyPolicy,
|
||||
body: context.l10n.termsPrivacyPolicyBody,
|
||||
),
|
||||
child: Text(context.l10n.commonView),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
_termsButtons(context),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
body: ListView(
|
||||
@@ -156,10 +205,12 @@ class _TermsScreenState extends State<TermsScreen> {
|
||||
),
|
||||
),
|
||||
),
|
||||
for (final t in _Term.values) ...[
|
||||
for (final (t, body) in [
|
||||
for (final t in _Term.values) (t, t.body(context.l10n)),
|
||||
]) ...[
|
||||
const SizedBox(height: AppSpace.s3),
|
||||
_Box(
|
||||
child: t.body
|
||||
child: body != null
|
||||
? Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
@@ -174,15 +225,17 @@ class _TermsScreenState extends State<TermsScreen> {
|
||||
onTap: () => _toggle(t),
|
||||
),
|
||||
),
|
||||
const Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: AppSpace.s4),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: AppSpace.s4,
|
||||
),
|
||||
child: SizedBox(
|
||||
height: 80,
|
||||
child: ClipRect(
|
||||
child: Text(
|
||||
_body,
|
||||
body,
|
||||
overflow: TextOverflow.clip,
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
fontFamily: AppFonts.display,
|
||||
fontFamilyFallback: [AppFonts.body],
|
||||
fontSize: 12,
|
||||
|
||||
Reference in New Issue
Block a user