mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 11:39:22 +00:00
Update standard lists
This commit is contained in:
parent
8ced5a9970
commit
859d1d540c
4 changed files with 82 additions and 17 deletions
|
@ -203,14 +203,14 @@ class _ContactPageBodyState extends State<ContactPageBody> with SingleTickerProv
|
|||
),
|
||||
),
|
||||
leading: _buildCurrencyIcon(activeContact),
|
||||
tilePadding: const EdgeInsets.only(left: 12, right: 12),
|
||||
tilePadding: const EdgeInsets.only(left: 16, right: 16),
|
||||
childrenPadding: const EdgeInsets.only(left: 16),
|
||||
expandedCrossAxisAlignment: CrossAxisAlignment.start,
|
||||
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)),
|
||||
collapsedShape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
|
||||
children: groupContacts.map((contact) => generateRaw(context, contact)).toList(),
|
||||
),
|
||||
);
|
||||
|
@ -245,11 +245,11 @@ class _ContactPageBodyState extends State<ContactPageBody> with SingleTickerProv
|
|||
behavior: HitTestBehavior.opaque,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(8)),
|
||||
borderRadius: BorderRadius.all(Radius.circular(10)),
|
||||
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),
|
||||
padding: const EdgeInsets.only(top: 16, bottom: 16, right: 16, left: 16),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
|
@ -395,7 +395,7 @@ class _ContactListBodyState extends State<ContactListBody> {
|
|||
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),
|
||||
padding: const EdgeInsets.only(top: 16, bottom: 16, right: 16, left: 16),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
|
|
|
@ -18,6 +18,37 @@ class NodeListRow extends StandardListRow {
|
|||
final Node node;
|
||||
final bool isPow;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final leading = buildLeading(context);
|
||||
final trailing = buildTrailing(context);
|
||||
return Container(
|
||||
height: 56,
|
||||
padding: EdgeInsets.only(left: 12, right: 12, top: 2, bottom: 2),
|
||||
margin: EdgeInsets.only(top: 2, bottom: 2),
|
||||
child: TextButton(
|
||||
onPressed: () => onTap?.call(context),
|
||||
style: ButtonStyle(
|
||||
backgroundColor: MaterialStateProperty.all(Theme.of(context).cardColor),
|
||||
shape: MaterialStateProperty.all(
|
||||
RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(10)
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: <Widget>[
|
||||
if (leading != null) leading,
|
||||
buildCenter(context, hasLeftOffset: leading != null),
|
||||
if (trailing != null) trailing,
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget buildLeading(BuildContext context) {
|
||||
return FutureBuilder(
|
||||
|
@ -56,6 +87,36 @@ class NodeHeaderListRow extends StandardListRow {
|
|||
NodeHeaderListRow({required String title, required void Function(BuildContext context) onTap})
|
||||
: super(title: title, onTap: onTap, isSelected: false);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final leading = buildLeading(context);
|
||||
final trailing = buildTrailing(context);
|
||||
return Container(
|
||||
height: 56,
|
||||
padding: EdgeInsets.only(left: 12, right: 12, top: 2, bottom: 2),
|
||||
child: TextButton(
|
||||
onPressed: () => onTap?.call(context),
|
||||
style: ButtonStyle(
|
||||
backgroundColor: MaterialStateProperty.all(Theme.of(context).cardColor),
|
||||
shape: MaterialStateProperty.all(
|
||||
RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(10)
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: <Widget>[
|
||||
if (leading != null) leading,
|
||||
buildCenter(context, hasLeftOffset: leading != null),
|
||||
if (trailing != null) trailing,
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget buildTrailing(BuildContext context) {
|
||||
return SizedBox(
|
||||
|
|
|
@ -34,7 +34,6 @@ class ManageNodesPage extends BasePage {
|
|||
onTap: (_) async => await Navigator.of(context).pushNamed(Routes.newNode),
|
||||
),
|
||||
),
|
||||
const StandardListSeparator(padding: EdgeInsets.symmetric(horizontal: 24)),
|
||||
SizedBox(height: 20),
|
||||
Observer(
|
||||
builder: (BuildContext context) {
|
||||
|
|
|
@ -21,16 +21,20 @@ class StandardListRow extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
final leading = buildLeading(context);
|
||||
final trailing = buildTrailing(context);
|
||||
|
||||
return InkWell(
|
||||
onTap: () => onTap?.call(context),
|
||||
child: Container(
|
||||
return Container(
|
||||
height: 56,
|
||||
padding: EdgeInsets.only(left: 24, right: 24),
|
||||
decoration: decoration ??
|
||||
BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.background,
|
||||
padding: EdgeInsets.only(left: 12, right: 12),
|
||||
child: TextButton(
|
||||
onPressed: () => onTap?.call(context),
|
||||
style: ButtonStyle(
|
||||
//backgroundColor: MaterialStateProperty.all(Theme.of(context).cardColor),
|
||||
shape: MaterialStateProperty.all(
|
||||
RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(10)
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: <Widget>[
|
||||
|
@ -97,10 +101,10 @@ class StandardListSeparator extends StatelessWidget {
|
|||
return Container(
|
||||
height: height,
|
||||
padding: padding,
|
||||
color: Theme.of(context).colorScheme.background,
|
||||
color: Colors.transparent,
|
||||
child: Container(
|
||||
height: height,
|
||||
color: Theme.of(context).extension<CakeTextTheme>()!.textfieldUnderlineColor,
|
||||
color: Colors.transparent,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -140,6 +144,7 @@ class SectionStandardList extends StatelessWidget {
|
|||
|
||||
final int sectionCount;
|
||||
final bool hasTopSeparator;
|
||||
|
||||
final int Function(int sectionIndex) itemCounter;
|
||||
final Widget Function(int sectionIndex, int itemIndex) itemBuilder;
|
||||
final Widget Function(int sectionIndex)? sectionTitleBuilder;
|
||||
|
|
Loading…
Reference in a new issue