mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-03 09:29:48 +00:00
Update address book page
This commit is contained in:
parent
2ef3e5a797
commit
8ced5a9970
1 changed files with 27 additions and 8 deletions
|
@ -110,10 +110,12 @@ class _ContactPageBodyState extends State<ContactPageBody> with SingleTickerProv
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.only(left: 24, right: 24),
|
padding: const EdgeInsets.only(),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Align(
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 24, right: 24, bottom: 8),
|
||||||
|
child: Align(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: TabBar(
|
child: TabBar(
|
||||||
controller: _tabController,
|
controller: _tabController,
|
||||||
|
@ -144,6 +146,7 @@ class _ContactPageBodyState extends State<ContactPageBody> with SingleTickerProv
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: TabBarView(
|
child: TabBarView(
|
||||||
controller: _tabController,
|
controller: _tabController,
|
||||||
|
@ -173,7 +176,7 @@ class _ContactPageBodyState extends State<ContactPageBody> with SingleTickerProv
|
||||||
itemCount: groupedContacts.length * 2,
|
itemCount: groupedContacts.length * 2,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
if (index.isOdd) {
|
if (index.isOdd) {
|
||||||
return StandardListSeparator();
|
return StandardListSeparator(height: 0);
|
||||||
} else {
|
} else {
|
||||||
final groupIndex = index ~/ 2;
|
final groupIndex = index ~/ 2;
|
||||||
final groupName = groupedContacts.keys.elementAt(groupIndex);
|
final groupName = groupedContacts.keys.elementAt(groupIndex);
|
||||||
|
@ -188,7 +191,9 @@ class _ContactPageBodyState extends State<ContactPageBody> with SingleTickerProv
|
||||||
orElse: () => groupContacts[0],
|
orElse: () => groupContacts[0],
|
||||||
);
|
);
|
||||||
|
|
||||||
return ExpansionTile(
|
return Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 16, right: 16, top: 4, bottom: 4),
|
||||||
|
child: ExpansionTile(
|
||||||
title: Text(
|
title: Text(
|
||||||
groupName,
|
groupName,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
@ -198,11 +203,16 @@ class _ContactPageBodyState extends State<ContactPageBody> with SingleTickerProv
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
leading: _buildCurrencyIcon(activeContact),
|
leading: _buildCurrencyIcon(activeContact),
|
||||||
tilePadding: EdgeInsets.zero,
|
tilePadding: const EdgeInsets.only(left: 12, right: 12),
|
||||||
childrenPadding: const EdgeInsets.only(left: 16),
|
childrenPadding: const EdgeInsets.only(left: 16),
|
||||||
expandedCrossAxisAlignment: CrossAxisAlignment.start,
|
expandedCrossAxisAlignment: CrossAxisAlignment.start,
|
||||||
expandedAlignment: Alignment.topLeft,
|
expandedAlignment: Alignment.topLeft,
|
||||||
|
backgroundColor: Theme.of(context).cardColor,
|
||||||
|
collapsedBackgroundColor: Theme.of(context).cardColor,
|
||||||
|
collapsedShape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
|
||||||
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
|
||||||
children: groupContacts.map((contact) => generateRaw(context, contact)).toList(),
|
children: groupContacts.map((contact) => generateRaw(context, contact)).toList(),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -234,7 +244,12 @@ class _ContactPageBodyState extends State<ContactPageBody> with SingleTickerProv
|
||||||
},
|
},
|
||||||
behavior: HitTestBehavior.opaque,
|
behavior: HitTestBehavior.opaque,
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: const EdgeInsets.only(top: 16, bottom: 16, right: 24),
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(8)),
|
||||||
|
color: Theme.of(context).cardColor,
|
||||||
|
),
|
||||||
|
margin: const EdgeInsets.only(top: 4, bottom: 4, left: 16, right: 16),
|
||||||
|
padding: const EdgeInsets.only(top: 16, bottom: 16, right: 12, left: 12),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
@ -375,7 +390,12 @@ class _ContactListBodyState extends State<ContactListBody> {
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
key: Key('${contact.name}'),
|
key: Key('${contact.name}'),
|
||||||
padding: const EdgeInsets.only(top: 16, bottom: 16, right: 24),
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(8)),
|
||||||
|
color: Theme.of(context).cardColor,
|
||||||
|
),
|
||||||
|
margin: const EdgeInsets.only(top: 4, bottom: 4, left: 16, right: 16),
|
||||||
|
padding: const EdgeInsets.only(top: 16, bottom: 16, right: 12, left: 12),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
@ -396,7 +416,6 @@ class _ContactListBodyState extends State<ContactListBody> {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
StandardListSeparator()
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue