Tweak bible font and avatar image layout

This commit is contained in:
kihong.kim
2026-01-24 23:15:54 +09:00
parent b758ef00a0
commit 2944b6d9b5
4 changed files with 81 additions and 27 deletions

View File

@@ -6,6 +6,8 @@ services:
context: ./backend context: ./backend
ports: ports:
- "4000:4000" - "4000:4000"
volumes:
- backend-uploads:/app/uploads
environment: environment:
PORT: "4000" PORT: "4000"
MONGODB_URI: "mongodb://mongo:27017/google-tv-dashboard" MONGODB_URI: "mongodb://mongo:27017/google-tv-dashboard"
@@ -25,3 +27,4 @@ services:
volumes: volumes:
mongo-data: mongo-data:
backend-uploads:

View File

@@ -114,17 +114,27 @@ class _FamilyManagerTabState extends State<FamilyManagerTab> {
return ListTile( return ListTile(
leading: CircleAvatar( leading: CircleAvatar(
backgroundColor: memberColor, backgroundColor: memberColor,
backgroundImage: member.iconUrl.isNotEmpty child: member.iconUrl.isNotEmpty
? NetworkImage(member.iconUrl) ? ClipOval(
: null, child: Image.network(
child: member.iconUrl.isEmpty member.iconUrl,
? Text( width: 40,
height: 40,
fit: BoxFit.cover,
errorBuilder: (context, error, stackTrace) => Text(
member.name.isNotEmpty member.name.isNotEmpty
? member.name[0].toUpperCase() ? member.name[0].toUpperCase()
: '?', : '?',
style: const TextStyle(fontSize: 20), style: const TextStyle(fontSize: 20),
),
),
) )
: null, : Text(
member.name.isNotEmpty
? member.name[0].toUpperCase()
: '?',
style: const TextStyle(fontSize: 20),
),
), ),
title: Text(member.name), title: Text(member.name),
subtitle: Text('Order: ${member.order}'), subtitle: Text('Order: ${member.order}'),
@@ -185,12 +195,16 @@ class _FamilyManagerTabState extends State<FamilyManagerTab> {
children: [ children: [
CircleAvatar( CircleAvatar(
backgroundColor: selectedColor, backgroundColor: selectedColor,
backgroundImage: selectedIconBytes != null child: selectedIconBytes != null
? MemoryImage(selectedIconBytes!) ? ClipOval(
: null, child: Image.memory(
child: selectedIconBytes == null selectedIconBytes!,
? const Icon(Icons.person, color: Colors.white) width: 40,
: null, height: 40,
fit: BoxFit.cover,
),
)
: const Icon(Icons.person, color: Colors.white),
), ),
const SizedBox(width: 16), const SizedBox(width: 16),
ElevatedButton.icon( ElevatedButton.icon(
@@ -377,12 +391,33 @@ class _FamilyManagerTabState extends State<FamilyManagerTab> {
children: [ children: [
CircleAvatar( CircleAvatar(
backgroundColor: selectedColor, backgroundColor: selectedColor,
backgroundImage: selectedIconBytes != null child: selectedIconBytes != null
? MemoryImage(selectedIconBytes!) ? ClipOval(
: previewImage, child: Image.memory(
child: (selectedIconBytes == null && previewImage == null) selectedIconBytes!,
? Text(member.name.isNotEmpty ? member.name[0] : '?') width: 40,
: null, height: 40,
fit: BoxFit.cover,
),
)
: (previewImage != null
? ClipOval(
child: Image(
image: previewImage!,
width: 40,
height: 40,
fit: BoxFit.cover,
errorBuilder:
(context, error, stackTrace) => Text(
member.name.isNotEmpty
? member.name[0]
: '?',
),
),
)
: Text(member.name.isNotEmpty
? member.name[0]
: '?')),
), ),
const SizedBox(width: 16), const SizedBox(width: 16),
ElevatedButton.icon( ElevatedButton.icon(

View File

@@ -60,7 +60,7 @@ class BibleVerseWidget extends StatelessWidget {
Text( Text(
verse.text, verse.text,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: Theme.of(context).textTheme.bodyLarge?.copyWith( style: Theme.of(context).textTheme.bodyMedium?.copyWith(
color: Colors.white, color: Colors.white,
height: 1.5, height: 1.5,
fontStyle: FontStyle.italic, fontStyle: FontStyle.italic,

View File

@@ -129,11 +129,28 @@ class TodoListWidget extends StatelessWidget {
contentPadding: EdgeInsets.zero, contentPadding: EdgeInsets.zero,
leading: CircleAvatar( leading: CircleAvatar(
backgroundColor: memberColor.withOpacity(0.2), backgroundColor: memberColor.withOpacity(0.2),
backgroundImage: member.iconUrl.isNotEmpty child: member.iconUrl.isNotEmpty
? NetworkImage(member.iconUrl) ? ClipOval(
: null, child: Image.network(
child: member.iconUrl.isEmpty member.iconUrl,
? (member.name.isNotEmpty width: 40,
height: 40,
fit: BoxFit.cover,
errorBuilder: (context, error, stackTrace) {
return Text(
member.name.isNotEmpty
? member.name[0].toUpperCase()
: '?',
style: TextStyle(
color: memberColor,
fontWeight: FontWeight.bold,
fontSize: 20,
),
);
},
),
)
: (member.name.isNotEmpty
? Text( ? Text(
member.name[0].toUpperCase(), member.name[0].toUpperCase(),
style: TextStyle( style: TextStyle(
@@ -145,8 +162,7 @@ class TodoListWidget extends StatelessWidget {
: Icon( : Icon(
Icons.person, Icons.person,
color: memberColor, color: memberColor,
)) )),
: null,
), ),
title: Text( title: Text(
todo.title, todo.title,