Compare commits

..

No commits in common. "e05a0f07ce91987b0274a167563ea5c58faefc2f" and "7ee8192d9577527909af9a6baa4dbea9a24c96fb" have entirely different histories.

17 changed files with 590 additions and 474 deletions

View File

@ -37,9 +37,7 @@ Phase 1 **A~C** 이후 실행 트랙. 작업 단위를 하나씩 처리한다.
- 앱 코드는 클로즈드 베타 직전 수준
- **`https://msn.iykyka.com` 라이브 + N3 완료 + Gemini 실초안 OK + Track A/B 완료**
- UI: **Soft Neutral + surface hierarchy** (`553cb62`) — GitHub `main` 머지 완료.
프로덕션 web 재빌드는 이 세션에 SSH/`.env`가 없어 보류 → 서버에서
`cd ~/project/ykavu && git pull && docker compose build web && docker compose up -d web`
- UI: **Quiet Ink** (틸 액센트 · 라이트/다크) 전면 적용 중 — FCM 실기기는 잠시 후순위
- 실 FCM 기기 수신 · Android 실기기 탭 · 사람 PoC 실행은 남음
### NEXT 순서

View File

@ -66,27 +66,24 @@ class _AutonomySettingsScreenState extends State<AutonomySettingsScreen> {
body: ListView(
padding: const EdgeInsets.fromLTRB(16, 8, 16, 32),
children: [
Container(
decoration: BoxDecoration(
color: AppTheme.glassFill(theme.brightness),
borderRadius: BorderRadius.circular(AppTheme.rPanel),
border: Border.all(color: AppTheme.glassBorder(theme.brightness)),
),
Card(
child: Column(
children: [
ListTile(
leading: const Icon(Icons.privacy_tip_outlined),
title: const Text('데이터 흐름'),
subtitle: const Text('무엇이 기기에 남고 서버로 가는지'),
trailing: const Icon(Icons.chevron_right, size: 18),
trailing: const Icon(Icons.chevron_right),
onTap: () {
Navigator.of(context).push(MaterialPageRoute(builder: (_) => const DataFlowScreen()));
},
),
Divider(height: 1, indent: 16, endIndent: 16, color: AppTheme.glassBorder(theme.brightness)),
const Divider(height: 1, indent: 16, endIndent: 16),
ListTile(
leading: const Icon(Icons.devices),
title: const Text('로그인 세션'),
subtitle: const Text('멀티 디바이스 세션 목록'),
trailing: const Icon(Icons.chevron_right, size: 18),
trailing: const Icon(Icons.chevron_right),
onTap: () {
Navigator.of(context).push(MaterialPageRoute(builder: (_) => const SessionsScreen()));
},

View File

@ -256,10 +256,10 @@ class _ChatScreenState extends State<ChatScreen> {
if (draft.isEscalate) {
return Container(
margin: const EdgeInsets.fromLTRB(12, 0, 12, 8),
padding: const EdgeInsets.all(14),
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: theme.colorScheme.errorContainer.withValues(alpha: 0.55),
borderRadius: BorderRadius.circular(AppTheme.rPanel),
color: theme.colorScheme.errorContainer.withValues(alpha: 0.92),
borderRadius: BorderRadius.circular(16),
border: Border.all(color: AppTheme.glassBorder(theme.brightness)),
),
child: Column(
@ -300,27 +300,32 @@ class _ChatScreenState extends State<ChatScreen> {
return Container(
margin: const EdgeInsets.fromLTRB(12, 0, 12, 8),
padding: const EdgeInsets.all(14),
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: AppTheme.glassFill(theme.brightness),
borderRadius: BorderRadius.circular(AppTheme.rPanel),
color: theme.colorScheme.secondaryContainer.withValues(alpha: 0.95),
borderRadius: BorderRadius.circular(16),
border: Border.all(color: AppTheme.glassBorder(theme.brightness)),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Text(
title,
style: theme.textTheme.titleSmall?.copyWith(
color: theme.colorScheme.onSurface,
fontWeight: FontWeight.w600,
),
Row(
children: [
Icon(Icons.auto_awesome, size: 18, color: theme.colorScheme.onSecondaryContainer),
const SizedBox(width: 6),
Expanded(
child: Text(
title,
style: theme.textTheme.titleSmall?.copyWith(color: theme.colorScheme.onSecondaryContainer),
),
),
],
),
if (isL0) ...[
const SizedBox(height: 6),
Text(
'L0에서는 와카뷰 발송이 막혀 있습니다. 초안을 입력창으로 옮긴 뒤 직접 보내거나, 메뉴 → 자율성에서 L1으로 바꾸세요.',
style: theme.textTheme.bodySmall?.copyWith(color: theme.colorScheme.onSurfaceVariant),
style: theme.textTheme.bodySmall?.copyWith(color: theme.colorScheme.onSecondaryContainer),
),
],
const SizedBox(height: 10),

View File

@ -299,6 +299,8 @@ class _ContactsScreenState extends State<ContactsScreen> {
padding: const EdgeInsets.symmetric(vertical: 48, horizontal: 32),
child: Column(
children: [
Icon(Icons.person_add_outlined, size: 40, color: theme.colorScheme.outline),
const SizedBox(height: 12),
Text('연락처가 없습니다', style: theme.textTheme.titleMedium),
const SizedBox(height: 8),
Text(
@ -314,65 +316,66 @@ class _ContactsScreenState extends State<ContactsScreen> {
),
),
for (final c in _contacts)
ListTile(
contentPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 2),
leading: CircleAvatar(
radius: 20,
backgroundColor: theme.colorScheme.surfaceContainerHighest,
child: Text(
c.displayName.isEmpty ? '?' : c.displayName.substring(0, 1),
style: TextStyle(
color: theme.colorScheme.onSurfaceVariant,
fontWeight: FontWeight.w600,
Padding(
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 2),
child: ListTile(
leading: CircleAvatar(
backgroundColor: theme.colorScheme.secondaryContainer,
child: Text(
c.displayName.isEmpty ? '?' : c.displayName.substring(0, 1),
style: TextStyle(
color: theme.colorScheme.onSecondaryContainer,
fontWeight: FontWeight.w700,
),
),
),
),
title: Text(c.displayName, style: theme.textTheme.titleSmall),
subtitle: Text(
c.contactUserId == null
? '사용자 ID 없음 — 대화 불가 (다시 추가 필요)'
: [
'사용자 #${c.contactUserId}',
if (c.relationshipNote.isNotEmpty) c.relationshipNote,
].join(' · '),
style: theme.textTheme.bodySmall?.copyWith(
color: c.contactUserId == null
? theme.colorScheme.error
: theme.colorScheme.onSurfaceVariant,
title: Text(c.displayName, style: theme.textTheme.titleSmall),
subtitle: Text(
c.contactUserId == null
? '사용자 ID 없음 — 대화 불가 (다시 추가 필요)'
: [
'사용자 #${c.contactUserId}',
if (c.relationshipNote.isNotEmpty) c.relationshipNote,
].join(' · '),
style: theme.textTheme.bodySmall?.copyWith(
color: c.contactUserId == null
? theme.colorScheme.error
: theme.colorScheme.onSurfaceVariant,
),
),
),
trailing: Row(
mainAxisSize: MainAxisSize.min,
children: [
if (c.contactUserId != null) ...[
TextButton(
onPressed: () => _startChat(c),
child: const Text('대화'),
),
trailing: Row(
mainAxisSize: MainAxisSize.min,
children: [
if (c.contactUserId != null) ...[
FilledButton.tonal(
onPressed: () => _startChat(c),
child: const Text('대화'),
),
IconButton(
tooltip: '수정',
icon: const Icon(Icons.edit_outlined, size: 20),
onPressed: () => _editContact(c),
),
] else
FilledButton(
onPressed: () => _editContact(c),
child: const Text('ID 입력'),
),
IconButton(
tooltip: '수정',
icon: const Icon(Icons.edit_outlined, size: 20),
onPressed: () => _editContact(c),
tooltip: '삭제',
icon: const Icon(Icons.delete_outline, size: 20),
onPressed: () => _delete(c),
),
] else
FilledButton(
onPressed: () => _editContact(c),
child: const Text('ID 입력'),
),
IconButton(
tooltip: '삭제',
icon: const Icon(Icons.delete_outline, size: 20),
onPressed: () => _delete(c),
),
],
],
),
onTap: () {
if (c.contactUserId == null) {
_editContact(c);
} else {
_startChat(c);
}
},
),
onTap: () {
if (c.contactUserId == null) {
_editContact(c);
} else {
_startChat(c);
}
},
),
const SizedBox(height: 72),
],

View File

@ -4,6 +4,7 @@ import 'package:provider/provider.dart';
import '../models/models.dart';
import '../services/api_client.dart';
import '../state/session_state.dart';
import '../theme/app_theme.dart';
import '../widgets/gradient_text.dart';
import '../widgets/my_user_id_chip.dart';
import 'autonomy_settings_screen.dart';
@ -156,16 +157,16 @@ class _ConversationListScreenState extends State<ConversationListScreen> {
Color _avatarColor(BuildContext context, int seed) {
final isDark = Theme.of(context).brightness == Brightness.dark;
final palette = isDark
? const [Color(0xFF1C1C1C), Color(0xFF22262E), Color(0xFF242018)]
: const [Color(0xFFF4F4F5), Color(0xFFE8EEF4), Color(0xFFF3F0EA)];
? const [Color(0xFF1F3A37), Color(0xFF2A3140), Color(0xFF3A3224)]
: const [Color(0xFFD9F3F0), Color(0xFFE8E6E1), Color(0xFFFFE8C8)];
return palette[seed % palette.length];
}
Color _onAvatarColor(BuildContext context, int seed) {
final isDark = Theme.of(context).brightness == Brightness.dark;
final palette = isDark
? const [Color(0xFFA3A3A3), Color(0xFF8BB4D9), Color(0xFFC4A574)]
: const [Color(0xFF525252), Color(0xFF3B6D9B), Color(0xFF9A7B4F)];
? const [Color(0xFF2DD4BF), Color(0xFFF2F1EF), Color(0xFFFBBF24)]
: const [Color(0xFF0F766E), Color(0xFF1C1B1A), Color(0xFFB45309)];
return palette[seed % palette.length];
}
@ -223,10 +224,10 @@ class _ConversationListScreenState extends State<ConversationListScreen> {
const SizedBox(width: 4),
],
),
floatingActionButton: FloatingActionButton(
floatingActionButton: FloatingActionButton.extended(
onPressed: _createConversation,
tooltip: '새 대화',
child: const Icon(Icons.chat_outlined),
icon: const Icon(Icons.chat),
label: const Text('새 대화'),
),
body: RefreshIndicator(
onRefresh: _load,
@ -254,9 +255,19 @@ class _ConversationListScreenState extends State<ConversationListScreen> {
),
if (_rooms.isEmpty)
Padding(
padding: const EdgeInsets.fromLTRB(32, 48, 32, 32),
padding: const EdgeInsets.fromLTRB(32, 56, 32, 32),
child: Column(
children: [
Container(
width: 68,
height: 68,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: theme.colorScheme.primaryContainer,
),
child: Icon(Icons.chat_bubble_outline, size: 28, color: theme.colorScheme.primary),
),
const SizedBox(height: 18),
Text('대화방이 없습니다', style: theme.textTheme.titleMedium),
const SizedBox(height: 8),
Text(
@ -270,81 +281,86 @@ class _ConversationListScreenState extends State<ConversationListScreen> {
),
),
const SizedBox(height: 18),
OutlinedButton(
FilledButton.tonalIcon(
onPressed: () async {
await Navigator.of(context).push(
MaterialPageRoute(builder: (_) => const ContactsScreen()),
);
await _load();
},
child: const Text('연락처 열기'),
icon: const Icon(Icons.contacts_outlined),
label: const Text('연락처 열기'),
),
],
),
),
for (final room in _rooms)
Material(
color: Colors.transparent,
child: InkWell(
onTap: () async {
await Navigator.of(context).push(
MaterialPageRoute(
builder: (_) => ChatScreen(
conversationId: room.id,
title: _titleFor(room, me),
),
),
);
await _load();
},
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
child: Row(
children: [
CircleAvatar(
radius: 22,
backgroundColor: _avatarColor(context, room.id),
child: Icon(
room.isGroup ? Icons.groups_outlined : Icons.person_outline,
size: 20,
color: _onAvatarColor(context, room.id),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 3),
child: Material(
color: AppTheme.glassFill(theme.brightness),
borderRadius: BorderRadius.circular(16),
child: InkWell(
borderRadius: BorderRadius.circular(16),
onTap: () async {
await Navigator.of(context).push(
MaterialPageRoute(
builder: (_) => ChatScreen(
conversationId: room.id,
title: _titleFor(room, me),
),
),
const SizedBox(width: 12),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
_titleFor(room, me),
style: theme.textTheme.titleSmall?.copyWith(fontWeight: FontWeight.w600),
),
const SizedBox(height: 2),
Row(
children: [
if (room.twinDisabledByPeer) ...[
Icon(Icons.block, size: 13, color: theme.colorScheme.error),
const SizedBox(width: 4),
],
Expanded(
child: Text(
_subtitleFor(room, me),
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: theme.textTheme.bodySmall?.copyWith(
color: room.twinDisabledByPeer
? theme.colorScheme.error
: theme.colorScheme.onSurfaceVariant,
);
await _load();
},
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 12),
child: Row(
children: [
CircleAvatar(
radius: 24,
backgroundColor: _avatarColor(context, room.id),
child: Icon(
room.isGroup ? Icons.groups_outlined : Icons.person_outline,
color: _onAvatarColor(context, room.id),
),
),
const SizedBox(width: 12),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
_titleFor(room, me),
style: theme.textTheme.titleSmall?.copyWith(fontWeight: FontWeight.w700),
),
const SizedBox(height: 3),
Row(
children: [
if (room.twinDisabledByPeer) ...[
Icon(Icons.block, size: 13, color: theme.colorScheme.error),
const SizedBox(width: 4),
],
Expanded(
child: Text(
_subtitleFor(room, me),
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: theme.textTheme.bodySmall?.copyWith(
color: room.twinDisabledByPeer
? theme.colorScheme.error
: theme.colorScheme.onSurfaceVariant,
),
),
),
),
],
),
],
],
),
],
),
),
),
Icon(Icons.chevron_right, size: 18, color: theme.colorScheme.onSurfaceVariant),
],
Icon(Icons.chevron_right, size: 20, color: theme.colorScheme.onSurfaceVariant),
],
),
),
),
),

View File

@ -10,28 +10,42 @@ class DataFlowScreen extends StatelessWidget {
Widget _section(
BuildContext context, {
required IconData icon,
required Color tint,
required String title,
required String body,
}) {
final theme = Theme.of(context);
return Container(
margin: const EdgeInsets.only(bottom: 12),
margin: const EdgeInsets.only(bottom: 16),
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: AppTheme.glassFill(theme.brightness),
borderRadius: BorderRadius.circular(AppTheme.rPanel),
borderRadius: BorderRadius.circular(16),
border: Border.all(color: AppTheme.glassBorder(theme.brightness)),
),
child: Column(
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(title, style: theme.textTheme.titleSmall),
const SizedBox(height: 6),
Text(
body,
style: theme.textTheme.bodyMedium?.copyWith(
color: theme.colorScheme.onSurfaceVariant,
height: 1.45,
Container(
width: 36,
height: 36,
alignment: Alignment.center,
decoration: BoxDecoration(color: tint.withValues(alpha: 0.15), shape: BoxShape.circle),
child: Icon(icon, size: 18, color: tint),
),
const SizedBox(width: 12),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(title, style: theme.textTheme.titleSmall),
const SizedBox(height: 4),
Text(
body,
style: theme.textTheme.bodyMedium?.copyWith(color: theme.colorScheme.onSurfaceVariant),
),
],
),
),
],
@ -52,40 +66,32 @@ class DataFlowScreen extends StatelessWidget {
children: [
_section(
context,
icon: Icons.lock_outline,
tint: Colors.green.shade600,
title: '기기 안에만 둡니다',
body: '말투 샘플·온보딩 입력은 이 기기의 로컬 저장소에만 보관합니다. '
'원문 대화 전체를 서버로 올리지 않는 것이 기본 원칙입니다.',
),
Container(
margin: const EdgeInsets.only(bottom: 12),
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: AppTheme.glassFill(theme.brightness),
borderRadius: BorderRadius.circular(AppTheme.rPanel),
border: Border.all(color: AppTheme.glassBorder(theme.brightness)),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('말투 샘플 ${samples.length}', style: theme.textTheme.titleSmall),
const SizedBox(height: 6),
Text(
[
samples.isEmpty ? '(아직 없음 — 말투 샘플 화면에서 추가)' : samples.take(3).join(' · '),
session.localDbEncrypted
? '저장: drift + SQLCipher(암호화)'
: '저장: 메모리/웹 스텁(이 환경에 SQLCipher 없음 — Chrome·Linux 폴백)',
].join('\n'),
style: theme.textTheme.bodyMedium?.copyWith(
color: theme.colorScheme.onSurfaceVariant,
height: 1.45,
),
),
],
Card(
margin: const EdgeInsets.only(bottom: 16),
child: ListTile(
leading: Icon(Icons.record_voice_over_outlined, color: theme.colorScheme.primary),
title: Text('말투 샘플 ${samples.length}'),
subtitle: Text(
[
samples.isEmpty ? '(아직 없음 — 말투 샘플 화면에서 추가)' : samples.take(3).join(' · '),
session.localDbEncrypted
? '저장: drift + SQLCipher(암호화)'
: '저장: 메모리/웹 스텁(이 환경에 SQLCipher 없음 — Chrome·Linux 폴백)',
].join('\n'),
),
isThreeLine: true,
),
),
_section(
context,
icon: Icons.cloud_upload_outlined,
tint: Colors.amber.shade800,
title: '서버로 보낼 수 있는 것',
body: '초안이 필요할 때: 최근 대화 몇 줄 + 말투 샘플 일부(최소 컨텍스트)\n'
'채팅 릴레이: 보낸 메시지 본문\n'
@ -94,6 +100,8 @@ class DataFlowScreen extends StatelessWidget {
),
_section(
context,
icon: Icons.block,
tint: theme.colorScheme.error,
title: '보내지 않는 것',
body: '전체 채팅 백업 업로드, 온디바이스 말투 학습 원문 코퍼스, '
'관계 메모의 자동 클라우드 분석',

View File

@ -4,7 +4,6 @@ import 'package:provider/provider.dart';
import '../models/models.dart';
import '../services/api_client.dart';
import '../state/session_state.dart';
import '../theme/app_theme.dart';
import 'chat_screen.dart';
/// Post-hoc notification inbox: escalation logs that need human attention.
@ -54,89 +53,98 @@ class _InboxScreenState extends State<InboxScreen> {
child: _loading
? ListView(children: const [SizedBox(height: 160), Center(child: CircularProgressIndicator())])
: ListView(
padding: const EdgeInsets.fromLTRB(16, 12, 16, 24),
padding: const EdgeInsets.fromLTRB(12, 12, 12, 24),
children: [
Text(
'와카뷰가 보류·차단한 내용과 에스컬레이션 기록입니다. '
'이미 보낸 와카뷰 메시지는 해당 대화방에서 되돌릴 수 있습니다.',
style: theme.textTheme.bodyMedium?.copyWith(color: theme.colorScheme.onSurfaceVariant),
Padding(
padding: const EdgeInsets.fromLTRB(4, 0, 4, 12),
child: Text(
'와카뷰가 보류·차단한 내용과 에스컬레이션 기록입니다. '
'이미 보낸 와카뷰 메시지는 해당 대화방에서 되돌릴 수 있습니다.',
style: theme.textTheme.bodyMedium?.copyWith(color: theme.colorScheme.onSurfaceVariant),
),
),
const SizedBox(height: 12),
if (_error != null)
Padding(
padding: const EdgeInsets.only(bottom: 8),
padding: const EdgeInsets.symmetric(horizontal: 4, vertical: 8),
child: Text(_error!, style: TextStyle(color: theme.colorScheme.error)),
),
if (_logs.isEmpty)
Padding(
padding: const EdgeInsets.symmetric(vertical: 56),
child: Center(
child: Text('새 알림이 없습니다', style: theme.textTheme.titleMedium),
padding: const EdgeInsets.symmetric(vertical: 64, horizontal: 32),
child: Column(
children: [
Icon(Icons.notifications_none, size: 40, color: theme.colorScheme.outline),
const SizedBox(height: 12),
Text('새 알림이 없습니다', style: theme.textTheme.titleMedium),
],
),
),
for (final log in _logs)
Material(
color: Colors.transparent,
child: InkWell(
onTap: () {
Navigator.of(context).push(
MaterialPageRoute(
builder: (_) => ChatScreen(conversationId: log.conversationId),
),
);
},
child: Container(
margin: const EdgeInsets.only(bottom: 8),
padding: const EdgeInsets.all(14),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(AppTheme.rPanel),
border: Border.all(color: AppTheme.glassBorder(theme.brightness)),
color: AppTheme.glassFill(theme.brightness),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Expanded(
child: Text(
log.reason.isEmpty ? '에스컬레이션' : log.reason,
style: theme.textTheme.titleSmall,
),
),
Text(
log.resolved ? '처리됨' : '확인 필요',
style: theme.textTheme.labelSmall?.copyWith(
color: log.resolved
? theme.colorScheme.onSurfaceVariant
: theme.colorScheme.error,
fontWeight: FontWeight.w600,
),
),
],
Padding(
padding: const EdgeInsets.only(bottom: 8),
child: Card(
child: InkWell(
borderRadius: BorderRadius.circular(16),
onTap: () {
Navigator.of(context).push(
MaterialPageRoute(
builder: (_) => ChatScreen(conversationId: log.conversationId),
),
const SizedBox(height: 4),
Text(
'대화방 #${log.conversationId}',
style: theme.textTheme.bodySmall
?.copyWith(color: theme.colorScheme.onSurfaceVariant),
),
if (log.messageSnippet.isNotEmpty) ...[
const SizedBox(height: 6),
Text(
log.messageSnippet,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: theme.textTheme.bodyMedium,
);
},
child: Padding(
padding: const EdgeInsets.all(14),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
CircleAvatar(
radius: 18,
backgroundColor: log.resolved
? theme.colorScheme.primaryContainer
: theme.colorScheme.errorContainer,
child: Icon(
log.resolved ? Icons.check_circle_outline : Icons.warning_amber_rounded,
size: 18,
color: log.resolved
? theme.colorScheme.onPrimaryContainer
: theme.colorScheme.onErrorContainer,
),
),
const SizedBox(width: 12),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
log.reason.isEmpty ? '에스컬레이션' : log.reason,
style: theme.textTheme.titleSmall,
),
const SizedBox(height: 2),
Text(
'대화방 #${log.conversationId}',
style: theme.textTheme.bodySmall
?.copyWith(color: theme.colorScheme.onSurfaceVariant),
),
if (log.messageSnippet.isNotEmpty) ...[
const SizedBox(height: 6),
Text(
log.messageSnippet,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: theme.textTheme.bodyMedium,
),
],
const SizedBox(height: 6),
Text(
log.createdAt.toLocal().toString().split('.').first,
style: theme.textTheme.labelSmall
?.copyWith(color: theme.colorScheme.outline),
),
],
),
),
],
const SizedBox(height: 6),
Text(
log.createdAt.toLocal().toString().split('.').first,
style: theme.textTheme.labelSmall
?.copyWith(color: theme.colorScheme.outline),
),
],
),
),
),
),

View File

@ -61,8 +61,21 @@ class _OnboardingToneScreenState extends State<OnboardingToneScreen> {
),
body: SafeArea(
child: ListView(
padding: const EdgeInsets.fromLTRB(24, 12, 24, 32),
padding: const EdgeInsets.fromLTRB(24, 8, 24, 32),
children: [
Align(
alignment: Alignment.centerLeft,
child: Container(
width: 52,
height: 52,
decoration: BoxDecoration(
color: scheme.primaryContainer,
borderRadius: BorderRadius.circular(14),
),
child: Icon(Icons.record_voice_over_outlined, size: 26, color: scheme.primary),
),
),
const SizedBox(height: 18),
Text('와카뷰가 따라 쓸 말투', style: theme.textTheme.headlineSmall),
const SizedBox(height: 8),
Text(
@ -80,6 +93,21 @@ class _OnboardingToneScreenState extends State<OnboardingToneScreen> {
decoration: InputDecoration(
labelText: '샘플 ${i + 1}',
hintText: i == 0 ? '예: ㅇㅇ 알겠음' : null,
prefixIcon: Padding(
padding: const EdgeInsets.only(left: 10, right: 4),
child: CircleAvatar(
radius: 12,
backgroundColor: scheme.primaryContainer,
child: Text(
'${i + 1}',
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w700,
color: scheme.onPrimaryContainer,
),
),
),
),
),
),
const SizedBox(height: 12),

View File

@ -95,17 +95,30 @@ class _SessionsScreenState extends State<SessionsScreen> {
child: Text(_error!, style: TextStyle(color: theme.colorScheme.error)),
),
for (final s in _sessions)
ListTile(
contentPadding: const EdgeInsets.symmetric(horizontal: 12, vertical: 2),
title: Text(
s['is_current'] == true ? '이 기기 (현재)' : '세션 #${s['id']}',
style: theme.textTheme.titleSmall,
),
subtitle: Text('만료: ${s['expires_at'] ?? ''}', style: theme.textTheme.bodySmall),
trailing: IconButton(
tooltip: '세션 종료',
icon: const Icon(Icons.logout),
onPressed: () => _revoke(s),
Padding(
padding: const EdgeInsets.symmetric(vertical: 2),
child: ListTile(
leading: CircleAvatar(
backgroundColor: s['is_current'] == true
? theme.colorScheme.primaryContainer
: theme.colorScheme.surfaceContainerHighest,
child: Icon(
s['is_current'] == true ? Icons.smartphone : Icons.devices_other,
color: s['is_current'] == true
? theme.colorScheme.onPrimaryContainer
: theme.colorScheme.onSurfaceVariant,
),
),
title: Text(
s['is_current'] == true ? '이 기기 (현재)' : '세션 #${s['id']}',
style: theme.textTheme.titleSmall,
),
subtitle: Text('만료: ${s['expires_at'] ?? ''}', style: theme.textTheme.bodySmall),
trailing: IconButton(
tooltip: '세션 종료',
icon: const Icon(Icons.logout),
onPressed: () => _revoke(s),
),
),
),
],

View File

@ -133,15 +133,15 @@ class _DemoTestPanel extends StatelessWidget {
final brightness = theme.brightness;
return Material(
color: Colors.transparent,
borderRadius: BorderRadius.circular(AppTheme.rPanel),
borderRadius: BorderRadius.circular(16),
child: InkWell(
onTap: onFill,
borderRadius: BorderRadius.circular(AppTheme.rPanel),
borderRadius: BorderRadius.circular(16),
child: Container(
padding: const EdgeInsets.fromLTRB(16, 14, 12, 14),
decoration: BoxDecoration(
color: AppTheme.glassFill(brightness),
borderRadius: BorderRadius.circular(AppTheme.rPanel),
borderRadius: BorderRadius.circular(16),
border: Border.all(color: AppTheme.glassBorder(brightness)),
),
child: Column(
@ -150,9 +150,8 @@ class _DemoTestPanel extends StatelessWidget {
Text(
'테스트용 (누구나)',
style: theme.textTheme.labelLarge?.copyWith(
color: theme.colorScheme.onSurfaceVariant,
letterSpacing: 0.15,
fontWeight: FontWeight.w600,
color: theme.colorScheme.primary,
letterSpacing: 0.2,
),
),
const SizedBox(height: 6),
@ -163,7 +162,7 @@ class _DemoTestPanel extends StatelessWidget {
'초대 코드 ${AppConfig.demoInviteCode}\n표시 이름 ${AppConfig.demoDisplayName}',
style: theme.textTheme.titleSmall?.copyWith(
height: 1.45,
fontWeight: FontWeight.w600,
fontWeight: FontWeight.w700,
),
),
),

View File

@ -33,12 +33,9 @@ class SplashScreen extends StatelessWidget {
),
const SizedBox(height: 32),
SizedBox(
width: 22,
height: 22,
child: CircularProgressIndicator(
strokeWidth: 2,
color: scheme.onSurfaceVariant,
),
width: 28,
height: 28,
child: CircularProgressIndicator(strokeWidth: 2.5, color: scheme.primary),
),
],
),

View File

@ -1,104 +1,125 @@
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
/// Soft Neutral + surface hierarchy for .
/// Neutrals dominate; accent is thin (mine bubbles / small links only).
/// Radii: input/button 12, bubble 18. No glow, almost no shadow.
/// Quiet Ink calm messenger direction for .
/// Light: warm off-white canvas, charcoal ink, single deep-teal accent.
/// Dark: charcoal surfaces, same teal (brighter), twin stays warm amber.
/// Avoids aurora/purple glass so chat reads as a daily messenger, not a demo.
class AppTheme {
AppTheme._();
// Light neutrals
static const canvasLight = Color(0xFFFAFAF9);
// Light
static const canvasLight = Color(0xFFF7F6F3);
static const surfaceLight = Color(0xFFFFFFFF);
static const inkLight = Color(0xFF171717);
static const mutedLight = Color(0xFF737373);
static const lineLight = Color(0xFFE5E5E5);
static const softFillLight = Color(0xFFF4F4F5);
static const inkLight = Color(0xFF1C1B1A);
static const mutedLight = Color(0xFF6B6864);
static const lineLight = Color(0xFFE8E6E1);
static const teal = Color(0xFF0F766E);
static const tealSoft = Color(0xFFD9F3F0);
static const twinAmberLight = Color(0xFFB45309);
// Dark neutrals
static const canvasDark = Color(0xFF0A0A0A);
static const surfaceDark = Color(0xFF141414);
static const inkDark = Color(0xFFFAFAFA);
static const mutedDark = Color(0xFFA3A3A3);
static const lineDark = Color(0xFF262626);
static const softFillDark = Color(0xFF1C1C1C);
// Dark
static const canvasDark = Color(0xFF0E0F12);
static const surfaceDark = Color(0xFF1A1C22);
static const inkDark = Color(0xFFF2F1EF);
static const mutedDark = Color(0xFF9B9893);
static const lineDark = Color(0xFF2A2D36);
/// Dark accent muted teal (avoid neon cyan against charcoal).
static const tealBright = Color(0xFF5EBBB0);
static const tealSoftDark = Color(0xFF1A3331);
static const twinAmberDark = Color(0xFFE0A84A);
/// Thin accent used for mine bubbles & primary actions, not chrome.
static const accentLight = Color(0xFF3B6D9B);
static const accentDark = Color(0xFF8BB4D9);
static const accentSoftLight = Color(0xFFE8F0F7);
static const accentSoftDark = Color(0xFF1A2836);
static const twinAmberLight = Color(0xFF9A7B4F);
static const twinAmberDark = Color(0xFFC4A574);
/// Compat for older call sites.
static const teal = accentLight;
static const tealBright = accentDark;
static const canvasDarkCompat = canvasDark;
/// Kept for call sites that still reference a "brand" fill solid teal, not a rainbow.
static const brandGradient = LinearGradient(
colors: [accentLight, accentLight],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: [teal, Color(0xFF0D9488)],
);
static Color twinAccent(Brightness b) => b == Brightness.dark ? twinAmberDark : twinAmberLight;
static Color twinAccent(Brightness brightness) =>
brightness == Brightness.dark ? twinAmberDark : twinAmberLight;
static LinearGradient backgroundGradient(Brightness b) {
final c = b == Brightness.dark ? canvasDark : canvasLight;
return LinearGradient(colors: [c, c]);
/// Soft near-flat wash (not aurora). Used by [GradientBackdrop].
static LinearGradient backgroundGradient(Brightness brightness) {
if (brightness == Brightness.dark) {
return const LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [Color(0xFF12141A), canvasDark],
);
}
return const LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [Color(0xFFF3F2EE), canvasLight],
);
}
static Color glassFill(Brightness b) => b == Brightness.dark ? surfaceDark : surfaceLight;
static Color glassBorder(Brightness b) => b == Brightness.dark ? lineDark : lineLight;
static Color glassShadow(Brightness b) => Colors.transparent;
static Color glowPrimary(Brightness brightness) =>
(brightness == Brightness.dark ? tealBright : teal).withValues(alpha: 0.06);
static Color mineBubble(Brightness b) => b == Brightness.dark ? accentSoftDark : accentLight;
static Color mineBubbleFg(Brightness b) => b == Brightness.dark ? inkDark : Colors.white;
static Color peerBubble(Brightness b) => b == Brightness.dark ? softFillDark : softFillLight;
static Color glowSecondary(Brightness brightness) => Colors.transparent;
static const rInput = 12.0;
static const rButton = 12.0;
static const rBubble = 18.0;
static const rPanel = 12.0;
/// Panel fill (replaces glassmorphism).
static Color glassFill(Brightness brightness) =>
brightness == Brightness.dark ? surfaceDark : surfaceLight;
static Color glassBorder(Brightness brightness) =>
brightness == Brightness.dark ? lineDark : lineLight;
static Color glassShadow(Brightness brightness) =>
brightness == Brightness.dark ? Colors.black.withValues(alpha: 0.35) : const Color(0xFF1C1B1A).withValues(alpha: 0.06);
static Color mineBubble(Brightness brightness) =>
brightness == Brightness.dark ? const Color(0xFF244844) : teal;
static Color mineBubbleFg(Brightness brightness) =>
brightness == Brightness.dark ? inkDark : Colors.white;
static Color peerBubble(Brightness brightness) =>
brightness == Brightness.dark ? const Color(0xFF24272F) : const Color(0xFFEFEEEA);
static ThemeData light() => _build(Brightness.light);
static ThemeData dark() => _build(Brightness.dark);
static ThemeData _build(Brightness brightness) {
final isDark = brightness == Brightness.dark;
final primary = isDark ? accentDark : accentLight;
final primary = isDark ? tealBright : teal;
final onPrimary = isDark ? canvasDark : Colors.white;
final ink = isDark ? inkDark : inkLight;
final muted = isDark ? mutedDark : mutedLight;
final line = isDark ? lineDark : lineLight;
final canvas = isDark ? canvasDark : canvasLight;
final surface = isDark ? surfaceDark : surfaceLight;
final soft = isDark ? softFillDark : softFillLight;
final scheme = ColorScheme(
brightness: brightness,
primary: primary,
onPrimary: onPrimary,
primaryContainer: isDark ? accentSoftDark : accentSoftLight,
onPrimaryContainer: primary,
primaryContainer: isDark ? tealSoftDark : tealSoft,
onPrimaryContainer: isDark ? tealBright : const Color(0xFF0A4F4A),
secondary: isDark ? twinAmberDark : twinAmberLight,
onSecondary: isDark ? canvasDark : Colors.white,
secondaryContainer: soft,
onSecondaryContainer: muted,
secondaryContainer: isDark ? const Color(0xFF3D2E14) : const Color(0xFFFFE8C8),
onSecondaryContainer: isDark ? twinAmberDark : twinAmberLight,
tertiary: primary,
onTertiary: onPrimary,
error: isDark ? const Color(0xFFF87171) : const Color(0xFFB91C1C),
onError: Colors.white,
surface: surface,
onSurface: ink,
onSurfaceVariant: muted,
outline: line,
outlineVariant: line,
surfaceContainerHighest: soft,
surfaceContainerHigh: soft,
surfaceContainer: surface,
surface: isDark ? surfaceDark : surfaceLight,
onSurface: isDark ? inkDark : inkLight,
onSurfaceVariant: isDark ? mutedDark : mutedLight,
outline: isDark ? lineDark : lineLight,
outlineVariant: isDark ? lineDark : lineLight,
surfaceContainerHighest: isDark ? const Color(0xFF24272F) : const Color(0xFFEFEEEA),
surfaceContainerHigh: isDark ? const Color(0xFF20232A) : const Color(0xFFF3F2EE),
surfaceContainer: isDark ? surfaceDark : surfaceLight,
);
final textTheme = _textTheme(GoogleFonts.plusJakartaSansTextTheme(), ink);
final baseText = GoogleFonts.plusJakartaSansTextTheme();
final textTheme = _textTheme(baseText, scheme.onSurface);
final panel = glassFill(brightness);
final edge = glassBorder(brightness);
final shadow = glassShadow(brightness);
final shape = RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16),
side: BorderSide(color: edge),
);
return ThemeData(
useMaterial3: true,
@ -109,75 +130,70 @@ class AppTheme {
textTheme: textTheme,
primaryTextTheme: textTheme,
appBarTheme: AppBarTheme(
backgroundColor: canvas.withValues(alpha: 0.92),
foregroundColor: ink,
backgroundColor: Colors.transparent,
foregroundColor: scheme.onSurface,
surfaceTintColor: Colors.transparent,
elevation: 0,
scrolledUnderElevation: 0,
centerTitle: false,
titleTextStyle: textTheme.titleLarge?.copyWith(fontWeight: FontWeight.w600, letterSpacing: -0.2),
titleTextStyle: textTheme.titleLarge?.copyWith(fontWeight: FontWeight.w700, letterSpacing: -0.3),
),
cardTheme: CardThemeData(
elevation: 0,
color: surface,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(rPanel),
side: BorderSide(color: line),
),
shadowColor: shadow,
color: panel,
shape: shape,
margin: EdgeInsets.zero,
),
listTileTheme: ListTileThemeData(
iconColor: muted,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(rPanel)),
contentPadding: const EdgeInsets.symmetric(horizontal: 14, vertical: 2),
minVerticalPadding: 8,
iconColor: scheme.onSurfaceVariant,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(14)),
contentPadding: const EdgeInsets.symmetric(horizontal: 14, vertical: 4),
minVerticalPadding: 10,
),
dividerTheme: DividerThemeData(color: line, space: 1, thickness: 1),
dividerTheme: DividerThemeData(color: edge, space: 1, thickness: 1),
inputDecorationTheme: InputDecorationTheme(
filled: true,
fillColor: surface,
contentPadding: const EdgeInsets.symmetric(horizontal: 14, vertical: 12),
fillColor: isDark ? const Color(0xFF14161C) : const Color(0xFFF0EFEC),
contentPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(rInput),
borderSide: BorderSide(color: line),
borderRadius: BorderRadius.circular(14),
borderSide: BorderSide(color: edge),
),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(rInput),
borderSide: BorderSide(color: line),
borderRadius: BorderRadius.circular(14),
borderSide: BorderSide(color: edge),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(rInput),
borderSide: BorderSide(color: primary, width: 1.2),
borderRadius: BorderRadius.circular(14),
borderSide: BorderSide(color: primary, width: 1.5),
),
errorBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(rInput),
borderRadius: BorderRadius.circular(14),
borderSide: BorderSide(color: scheme.error),
),
focusedErrorBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(rInput),
borderSide: BorderSide(color: scheme.error, width: 1.2),
borderRadius: BorderRadius.circular(14),
borderSide: BorderSide(color: scheme.error, width: 1.5),
),
hintStyle: TextStyle(color: muted.withValues(alpha: 0.8)),
labelStyle: TextStyle(color: muted, fontWeight: FontWeight.w500),
hintStyle: TextStyle(color: scheme.onSurfaceVariant.withValues(alpha: 0.75)),
),
filledButtonTheme: FilledButtonThemeData(
style: FilledButton.styleFrom(
backgroundColor: isDark ? inkDark : inkLight,
foregroundColor: isDark ? canvasDark : Colors.white,
padding: const EdgeInsets.symmetric(horizontal: 18, vertical: 12),
minimumSize: const Size(0, 46),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(rButton)),
textStyle: const TextStyle(fontWeight: FontWeight.w600, fontSize: 15),
backgroundColor: primary,
foregroundColor: onPrimary,
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 14),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(14)),
textStyle: const TextStyle(fontWeight: FontWeight.w700),
elevation: 0,
),
),
outlinedButtonTheme: OutlinedButtonThemeData(
style: OutlinedButton.styleFrom(
foregroundColor: ink,
padding: const EdgeInsets.symmetric(horizontal: 18, vertical: 12),
minimumSize: const Size(0, 46),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(rButton)),
side: BorderSide(color: line),
foregroundColor: scheme.onSurface,
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 14),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(14)),
side: BorderSide(color: edge),
),
),
textButtonTheme: TextButtonThemeData(
@ -188,70 +204,60 @@ class AppTheme {
),
iconButtonTheme: IconButtonThemeData(
style: IconButton.styleFrom(
foregroundColor: muted,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
foregroundColor: scheme.onSurfaceVariant,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
),
),
chipTheme: ChipThemeData(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
side: BorderSide(color: line),
backgroundColor: surface,
labelStyle: TextStyle(color: muted, fontWeight: FontWeight.w500, fontSize: 12),
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 2),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
side: BorderSide(color: edge),
backgroundColor: panel,
labelStyle: TextStyle(color: scheme.onSurfaceVariant, fontWeight: FontWeight.w600, fontSize: 12),
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 4),
),
floatingActionButtonTheme: FloatingActionButtonThemeData(
backgroundColor: isDark ? inkDark : inkLight,
foregroundColor: isDark ? canvasDark : Colors.white,
elevation: 0,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(rButton)),
backgroundColor: primary,
foregroundColor: onPrimary,
elevation: 2,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
),
snackBarTheme: SnackBarThemeData(
behavior: SnackBarBehavior.floating,
backgroundColor: isDark ? softFillDark : inkLight,
backgroundColor: isDark ? surfaceDark : inkLight,
contentTextStyle: TextStyle(color: isDark ? inkDark : Colors.white),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(rPanel)),
elevation: 0,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
),
dialogTheme: DialogThemeData(
backgroundColor: surface,
elevation: 0,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16),
side: BorderSide(color: line),
),
backgroundColor: panel,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
),
progressIndicatorTheme: ProgressIndicatorThemeData(color: primary),
bannerTheme: MaterialBannerThemeData(backgroundColor: surface, padding: const EdgeInsets.all(16)),
segmentedButtonTheme: SegmentedButtonThemeData(
style: SegmentedButton.styleFrom(
backgroundColor: surface,
foregroundColor: muted,
selectedForegroundColor: ink,
selectedBackgroundColor: soft,
side: BorderSide(color: line),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(rButton)),
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 8),
),
),
bannerTheme: MaterialBannerThemeData(backgroundColor: panel, padding: const EdgeInsets.all(16)),
);
}
static TextTheme _textTheme(TextTheme base, Color ink) {
TextStyle s(TextStyle? t, {FontWeight? w, double? size, double? ls, double? h}) =>
(t ?? const TextStyle()).copyWith(color: ink, fontWeight: w, fontSize: size, letterSpacing: ls, height: h);
(t ?? const TextStyle()).copyWith(
color: ink,
fontWeight: w,
fontSize: size,
letterSpacing: ls,
height: h,
);
return base.copyWith(
displayLarge: s(base.displayLarge, w: FontWeight.w600, size: 36, ls: -1.0),
displaySmall: s(base.displaySmall, w: FontWeight.w600, size: 28, ls: -0.6),
headlineSmall: s(base.headlineSmall, w: FontWeight.w600, size: 20, ls: -0.2),
titleLarge: s(base.titleLarge, w: FontWeight.w600, size: 17, ls: -0.2),
titleMedium: s(base.titleMedium, w: FontWeight.w600, size: 15),
displayLarge: s(base.displayLarge, w: FontWeight.w700, size: 40, ls: -1.2),
displaySmall: s(base.displaySmall, w: FontWeight.w700, size: 32, ls: -0.8),
headlineSmall: s(base.headlineSmall, w: FontWeight.w700, size: 22, ls: -0.3),
titleLarge: s(base.titleLarge, w: FontWeight.w700, size: 18, ls: -0.2),
titleMedium: s(base.titleMedium, w: FontWeight.w600, size: 16),
titleSmall: s(base.titleSmall, w: FontWeight.w600, size: 14),
bodyLarge: s(base.bodyLarge, w: FontWeight.w400, size: 15, h: 1.45),
bodyLarge: s(base.bodyLarge, w: FontWeight.w400, size: 16, h: 1.45),
bodyMedium: s(base.bodyMedium, w: FontWeight.w400, size: 14, h: 1.45),
bodySmall: s(base.bodySmall, w: FontWeight.w400, size: 12, h: 1.4),
labelLarge: s(base.labelLarge, w: FontWeight.w500, size: 13),
labelSmall: s(base.labelSmall, w: FontWeight.w500, size: 11),
labelLarge: s(base.labelLarge, w: FontWeight.w600, size: 14),
labelSmall: s(base.labelSmall, w: FontWeight.w600, size: 11, ls: 0.1),
);
}
}

View File

@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
import '../theme/app_theme.dart';
/// Soft Neutral brand mark ink monogram, no glow or heavy tile chrome.
/// Quiet Ink brand mark solid teal tile with a "Y" monogram.
class BrandMark extends StatelessWidget {
const BrandMark({super.key, this.size = 64});
@ -11,22 +11,30 @@ class BrandMark extends StatelessWidget {
@override
Widget build(BuildContext context) {
final isDark = Theme.of(context).brightness == Brightness.dark;
final fill = isDark ? AppTheme.inkDark : AppTheme.inkLight;
final fill = isDark ? AppTheme.tealBright : AppTheme.teal;
final fg = isDark ? AppTheme.canvasDark : Colors.white;
final radius = size * 0.28;
return Container(
width: size,
height: size,
decoration: BoxDecoration(
color: fill,
borderRadius: BorderRadius.circular(AppTheme.rPanel),
borderRadius: BorderRadius.circular(radius),
boxShadow: [
BoxShadow(
color: AppTheme.teal.withValues(alpha: isDark ? 0.25 : 0.18),
blurRadius: size * 0.22,
offset: Offset(0, size * 0.08),
),
],
),
alignment: Alignment.center,
child: Text(
'Y',
style: TextStyle(
color: fg,
fontWeight: FontWeight.w700,
fontSize: size * 0.42,
fontWeight: FontWeight.w800,
fontSize: size * 0.44,
height: 1,
letterSpacing: -0.5,
),

View File

@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
import '../theme/app_theme.dart';
/// Brand wordmark ink weight, no rainbow gradient.
/// Brand wordmark ink (not rainbow gradient) so Quiet Ink stays calm.
class GradientText extends StatelessWidget {
const GradientText(this.text, {super.key, this.style, this.textAlign});
@ -16,7 +16,7 @@ class GradientText extends StatelessWidget {
return Text(
text,
textAlign: textAlign,
style: (style ?? const TextStyle()).copyWith(color: ink, fontWeight: FontWeight.w700),
style: (style ?? const TextStyle()).copyWith(color: ink, fontWeight: FontWeight.w800),
);
}
}

View File

@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
import '../models/models.dart';
import '../theme/app_theme.dart';
/// Twin messages get a warm thin border + label (PRD §3.1 ).
/// Twin messages get a dashed border + badge (PRD §3.1 ).
class MessageBubble extends StatelessWidget {
const MessageBubble({
super.key,
@ -34,54 +34,49 @@ class MessageBubble extends StatelessWidget {
final Color bg;
final Color fg;
Border? border;
if (retracted) {
bg = scheme.surfaceContainerHigh;
fg = scheme.onSurfaceVariant;
} else if (twin) {
bg = brightness == Brightness.dark
? const Color(0xFF221C14)
: const Color(0xFFFAF6F0);
fg = scheme.onSurface;
border = Border.all(color: accent.withValues(alpha: 0.4), width: 1);
} else if (isMine) {
bg = AppTheme.mineBubble(brightness);
fg = AppTheme.mineBubbleFg(brightness);
} else {
bg = AppTheme.peerBubble(brightness);
fg = scheme.onSurface;
border = Border.all(color: scheme.outlineVariant.withValues(alpha: 0.9));
}
final radius = BorderRadius.only(
topLeft: const Radius.circular(AppTheme.rBubble),
topRight: const Radius.circular(AppTheme.rBubble),
bottomLeft: Radius.circular(isMine ? AppTheme.rBubble : 6),
bottomRight: Radius.circular(isMine ? 6 : AppTheme.rBubble),
topLeft: const Radius.circular(18),
topRight: const Radius.circular(18),
bottomLeft: Radius.circular(isMine ? 18 : 5),
bottomRight: Radius.circular(isMine ? 5 : 18),
);
final bubble = Container(
constraints: BoxConstraints(maxWidth: MediaQuery.sizeOf(context).width * 0.76),
padding: const EdgeInsets.fromLTRB(14, 10, 14, 8),
decoration: BoxDecoration(
color: bg,
borderRadius: radius,
border: border,
),
decoration: BoxDecoration(color: bg, borderRadius: radius),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
if (twin)
Padding(
padding: const EdgeInsets.only(bottom: 4),
child: Text(
'와카뷰',
style: theme.textTheme.labelSmall?.copyWith(
color: accent,
fontWeight: FontWeight.w700,
letterSpacing: 0.2,
),
padding: const EdgeInsets.only(bottom: 6),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(Icons.auto_awesome, size: 13, color: accent),
const SizedBox(width: 4),
Text(
'와카뷰',
style: theme.textTheme.labelSmall?.copyWith(
color: accent,
fontWeight: FontWeight.w800,
letterSpacing: 0.2,
),
),
],
),
),
if (retracted)
@ -114,7 +109,12 @@ class MessageBubble extends StatelessWidget {
crossAxisAlignment: isMine ? CrossAxisAlignment.end : CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
bubble,
twin
? CustomPaint(
painter: _DashedRRectPainter(color: accent, radius: radius),
child: bubble,
)
: bubble,
if (twin && isMine && !retracted && onRetract != null)
Padding(
padding: const EdgeInsets.only(top: 2, right: 4, left: 4),
@ -143,3 +143,39 @@ class MessageBubble extends StatelessWidget {
);
}
}
class _DashedRRectPainter extends CustomPainter {
_DashedRRectPainter({required this.color, required this.radius});
final Color color;
final BorderRadius radius;
@override
void paint(Canvas canvas, Size size) {
final paint = Paint()
..color = color
..style = PaintingStyle.stroke
..strokeWidth = 1.2;
final rrect = radius.toRRect(Rect.fromLTWH(0.7, 0.7, size.width - 1.4, size.height - 1.4));
final path = Path()..addRRect(rrect);
canvas.drawPath(_dashPath(path, dashLength: 5, gapLength: 4), paint);
}
Path _dashPath(Path source, {required double dashLength, required double gapLength}) {
final metrics = source.computeMetrics();
final out = Path();
for (final metric in metrics) {
var distance = 0.0;
while (distance < metric.length) {
final next = distance + dashLength;
out.addPath(metric.extractPath(distance, next.clamp(0, metric.length)), Offset.zero);
distance = next + gapLength;
}
}
return out;
}
@override
bool shouldRepaint(covariant _DashedRRectPainter oldDelegate) =>
oldDelegate.color != color || oldDelegate.radius != radius;
}

View File

@ -34,19 +34,19 @@ class MyUserIdChip extends StatelessWidget {
final brightness = theme.brightness;
return Material(
color: AppTheme.glassFill(brightness),
borderRadius: BorderRadius.circular(AppTheme.rPanel),
borderRadius: BorderRadius.circular(14),
child: InkWell(
borderRadius: BorderRadius.circular(AppTheme.rPanel),
borderRadius: BorderRadius.circular(14),
onTap: () => _copy(context),
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 12),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(AppTheme.rPanel),
borderRadius: BorderRadius.circular(14),
border: Border.all(color: AppTheme.glassBorder(brightness)),
),
child: Row(
children: [
Icon(Icons.badge_outlined, size: 18, color: theme.colorScheme.onSurfaceVariant),
Icon(Icons.badge_outlined, size: 18, color: theme.colorScheme.primary),
const SizedBox(width: 10),
Expanded(
child: Column(
@ -61,8 +61,8 @@ class MyUserIdChip extends StatelessWidget {
Text(
'$userId',
style: theme.textTheme.titleMedium?.copyWith(
fontWeight: FontWeight.w600,
letterSpacing: 0.3,
fontWeight: FontWeight.w700,
letterSpacing: 0.4,
),
),
],
@ -72,7 +72,7 @@ class MyUserIdChip extends StatelessWidget {
'복사',
style: theme.textTheme.labelSmall?.copyWith(
color: theme.colorScheme.primary,
fontWeight: FontWeight.w600,
fontWeight: FontWeight.w700,
),
),
const SizedBox(width: 4),

View File

@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
import '../theme/app_theme.dart';
/// Primary CTA Soft Neutral ink fill (API name kept for call sites).
/// Primary CTA solid teal (API name kept for existing call sites).
class PrimaryGradientButton extends StatelessWidget {
const PrimaryGradientButton({
super.key,
@ -18,34 +18,28 @@ class PrimaryGradientButton extends StatelessWidget {
@override
Widget build(BuildContext context) {
final isDark = Theme.of(context).brightness == Brightness.dark;
final bg = isDark ? AppTheme.inkDark : AppTheme.inkLight;
final bg = isDark ? AppTheme.tealBright : AppTheme.teal;
final fg = isDark ? AppTheme.canvasDark : Colors.white;
final disabled = onPressed == null || loading;
return SizedBox(
height: 48,
height: 52,
width: double.infinity,
child: FilledButton(
onPressed: disabled && !loading ? null : onPressed,
style: FilledButton.styleFrom(
backgroundColor: bg,
foregroundColor: fg,
disabledBackgroundColor: bg.withValues(alpha: 0.35),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(AppTheme.rButton),
),
disabledBackgroundColor: bg.withValues(alpha: 0.4),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(14)),
elevation: 0,
shadowColor: Colors.transparent,
),
child: loading
? SizedBox(
height: 18,
width: 18,
height: 20,
width: 20,
child: CircularProgressIndicator(strokeWidth: 2, color: fg),
)
: Text(
label,
style: TextStyle(color: fg, fontWeight: FontWeight.w600, fontSize: 15),
),
: Text(label, style: TextStyle(color: fg, fontWeight: FontWeight.w700, fontSize: 16)),
),
);
}