Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/UI #5

Merged
merged 3 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions lib/ui/character_input_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,15 @@ class CharacterInputPage extends ConsumerStatefulWidget {

class _CharacterInputPageState extends ConsumerState<CharacterInputPage> {
final _formKey = GlobalKey<FormState>();
final _nameController = TextEditingController(text: 'フラッター');
final _nameController = TextEditingController(text: 'ペンペン');
final _personalityController = TextEditingController(
text: '''好奇心旺盛で新しい技術を学ぶことが大好き。
困っている開発者を見かけると放っておけない優しい性格''',
text: '好奇心旺盛で、仲間思い。',
);
final _storyController = TextEditingController(
text: '''スマートフォンアプリ開発の世界で生まれ育った若きエンジニア。
クロスプラットフォーム開発の可能性に魅了され、世界中の開発者たちと知識を共有しながら成長を続けている。
休日は技術書を読んだり、コミュニティイベントに参加したりして過ごしている。''',
text: '南極の小さなコロニーで暮らすペンギン。',
);
int _age = 23;
String _gender = '女性';
int _age = 3;
String _gender = '未選択';

// 年齢選択肢の生成
final List<int> _ageList = List.generate(100, (index) => index + 1);
Expand Down
106 changes: 54 additions & 52 deletions lib/ui/character_result_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,68 +27,70 @@ class CharacterResultPage extends StatelessWidget {
),
),
),
body: Column(
children: [
Container(
padding: const EdgeInsets.all(24.0),
child: Container(
height: 300,
width: 300,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16),
boxShadow: [
BoxShadow(
color: Colors.black.withValues(alpha: 0.1),
spreadRadius: 0,
blurRadius: 10,
offset: const Offset(0, 4),
body: SingleChildScrollView(
child: Column(
children: [
Container(
padding: const EdgeInsets.all(24.0),
child: Container(
height: 300,
width: 300,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16),
boxShadow: [
BoxShadow(
color: Colors.black.withValues(alpha: 0.1),
spreadRadius: 0,
blurRadius: 10,
offset: const Offset(0, 4),
),
],
),
child: ClipRRect(
borderRadius: BorderRadius.circular(16),
child: Image.memory(
Uri.parse(image).data!.contentAsBytes(),
fit: BoxFit.cover,
),
],
),
child: ClipRRect(
borderRadius: BorderRadius.circular(16),
child: Image.memory(
Uri.parse(image).data!.contentAsBytes(),
fit: BoxFit.cover,
),
),
),
),
Padding(
padding: const EdgeInsets.all(24.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'生成された説明',
style: textTheme.titleMedium?.copyWith(
color: colorScheme.primary,
fontWeight: FontWeight.bold,
),
),
const SizedBox(height: 16),
Card(
elevation: 0,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16),
side: BorderSide(
color: colorScheme.outline.withOpacity(0.1),
Padding(
padding: const EdgeInsets.all(24.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'生成された説明',
style: textTheme.titleMedium?.copyWith(
color: colorScheme.primary,
fontWeight: FontWeight.bold,
),
),
child: Padding(
padding: const EdgeInsets.all(16.0),
child: Text(
description,
style: textTheme.bodyLarge?.copyWith(
height: 1.6,
const SizedBox(height: 16),
Card(
elevation: 0,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16),
side: BorderSide(
color: colorScheme.outline.withOpacity(0.1),
),
),
child: Padding(
padding: const EdgeInsets.all(16.0),
child: Text(
description,
style: textTheme.bodyLarge?.copyWith(
height: 1.6,
),
),
),
),
),
],
],
),
),
),
],
],
),
),
);
}
Expand Down