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