Skip to content

Commit

Permalink
Merge pull request #5 from nozomi-koborinai/feature/ui
Browse files Browse the repository at this point in the history
Feature/UI
  • Loading branch information
nozomi-koborinai authored Jan 31, 2025
2 parents 79cf89d + 13af756 commit 77f5f38
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 60 deletions.
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

0 comments on commit 77f5f38

Please sign in to comment.