CAKE-217 | reduced space between rows in the trade_row.dart and transaction_raw.dart

OleksandrSobol committed Dec 18, 2020 at 20:02 UTC b59d6336657689b7d4b7be6c531fc5416ce024b0
2 files changed +103 -108
lib/src/screens/dashboard/widgets/trade_row.dart
+41 -44
@@ -25,54 +25,51 @@ class TradeRow extends StatelessWidget {
25 return InkWell(
26 onTap: onTap,
27 child: Container(
28 - height: 52,
28 + padding: EdgeInsets.fromLTRB(24, 8, 24, 8),
29 color: Colors.transparent,
30 - padding: EdgeInsets.only(left: 24, right: 24),
30 child: Row(
32 - crossAxisAlignment: CrossAxisAlignment.center,
33 - children: <Widget>[
34 - _getPoweredImage(provider),
35 - Expanded(
36 - child: Padding(
37 - padding: const EdgeInsets.only(left: 12),
38 - child: Container(
39 - height: 46,
40 - child: Column(
31 + mainAxisSize: MainAxisSize.max,
32 + crossAxisAlignment: CrossAxisAlignment.center,
33 + children: [
34 + _getPoweredImage(provider),
35 + SizedBox(width: 12),
36 + Expanded(
37 + child: Column(
38 + mainAxisSize: MainAxisSize.min,
39 + children: [
40 + Row(
41 mainAxisAlignment: MainAxisAlignment.spaceBetween,
42 - mainAxisSize: MainAxisSize.max,
42 children: <Widget>[
44 - Row(
45 - mainAxisAlignment: MainAxisAlignment.spaceBetween,
46 - children: <Widget>[
47 - Text('${from.toString()} → ${to.toString()}',
48 - style: TextStyle(
49 - fontSize: 16,
50 - fontWeight: FontWeight.w500,
51 - color: Colors.white
52 - )),
53 - formattedAmount != null
54 - ? Text(formattedAmount + ' ' + amountCrypto,
55 - style: TextStyle(
56 - fontSize: 16,
57 - fontWeight: FontWeight.w500,
58 - color: Colors.white
59 - ))
60 - : Container()
61 - ]),
62 - Row(
63 - mainAxisAlignment: MainAxisAlignment.spaceBetween,
64 - children: <Widget>[
65 - Text(createdAtFormattedDate,
66 - style: TextStyle(
67 - fontSize: 14,
68 - color: Theme.of(context).textTheme
69 - .overline.backgroundColor))
70 - ]),
71 - ],
72 - ),
73 - ),
74 - ))
75 - ]),
43 + Text('${from.toString()} → ${to.toString()}',
44 + style: TextStyle(
45 + fontSize: 16,
46 + fontWeight: FontWeight.w500,
47 + color: Colors.white
48 + )),
49 + formattedAmount != null
50 + ? Text(formattedAmount + ' ' + amountCrypto,
51 + style: TextStyle(
52 + fontSize: 16,
53 + fontWeight: FontWeight.w500,
54 + color: Colors.white
55 + ))
56 + : Container()
57 + ]),
58 + SizedBox(height: 5),
59 + Row(
60 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
61 + children: <Widget>[
62 + Text(createdAtFormattedDate,
63 + style: TextStyle(
64 + fontSize: 14,
65 + color: Theme.of(context).textTheme
66 + .overline.backgroundColor))
67 + ])
68 + ],
69 + )
70 + )
71 + ],
72 + ),
73 ));
74 }
75
lib/src/screens/dashboard/widgets/transaction_raw.dart
+62 -64
@@ -23,73 +23,71 @@ class TransactionRow extends StatelessWidget {
23 return InkWell(
24 onTap: onTap,
25 child: Container(
26 - height: 62,
26 + padding: EdgeInsets.fromLTRB(24, 8, 24, 8),
27 color: Colors.transparent,
28 - padding: EdgeInsets.only(left: 24, right: 24),
28 child: Row(
30 - crossAxisAlignment: CrossAxisAlignment.center,
31 - children: <Widget>[
32 - Container(
33 - height: 36,
34 - width: 36,
35 - decoration: BoxDecoration(
36 - shape: BoxShape.circle,
37 - color: Theme.of(context).textTheme.overline.decorationColor
38 - ),
39 - child: Image.asset(
40 - direction == TransactionDirection.incoming
41 - ? 'assets/images/down_arrow.png'
42 - : 'assets/images/up_arrow.png'),
29 + mainAxisSize: MainAxisSize.max,
30 + crossAxisAlignment: CrossAxisAlignment.center,
31 + children: [
32 + Container(
33 + height: 36,
34 + width: 36,
35 + decoration: BoxDecoration(
36 + shape: BoxShape.circle,
37 + color: Theme.of(context).textTheme.overline.decorationColor
38 ),
44 - Expanded(
45 - child: Container(
46 - padding: const EdgeInsets.only(left: 12),
47 - height: 56,
48 - child: Column(
49 - mainAxisAlignment: MainAxisAlignment.spaceBetween,
50 - mainAxisSize: MainAxisSize.max,
51 - children: <Widget>[
52 - Row(
53 - mainAxisAlignment: MainAxisAlignment.spaceBetween,
54 - children: <Widget>[
55 - Text(
56 - (direction == TransactionDirection.incoming
57 - ? S.of(context).received
58 - : S.of(context).sent) +
59 - (isPending ? S.of(context).pending : ''),
60 - style: TextStyle(
61 - fontSize: 16,
62 - fontWeight: FontWeight.w500,
63 - color: Colors.white)),
64 - Text(formattedAmount,
65 - style: TextStyle(
66 - fontSize: 16,
67 - fontWeight: FontWeight.w500,
68 - color: Colors.white))
69 - ]),
70 - Row(
71 - mainAxisAlignment: MainAxisAlignment.spaceBetween,
72 - children: <Widget>[
73 - Text(formattedDate,
74 - style: TextStyle(
75 - fontSize: 14,
76 - color: Theme.of(context)
77 - .textTheme
78 - .overline
79 - .backgroundColor)),
80 - Text(formattedFiatAmount,
81 - style: TextStyle(
82 - fontSize: 14,
83 - color: Theme.of(context)
84 - .textTheme
85 - .overline
86 - .backgroundColor))
87 - ]),
88 - ],
89 - ),
90 - ),
91 - )
92 - ]),
39 + child: Image.asset(
40 + direction == TransactionDirection.incoming
41 + ? 'assets/images/down_arrow.png'
42 + : 'assets/images/up_arrow.png'),
43 + ),
44 + SizedBox(width: 12),
45 + Expanded(
46 + child: Column(
47 + mainAxisSize: MainAxisSize.min,
48 + children: [
49 + Row(
50 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
51 + children: <Widget>[
52 + Text(
53 + (direction == TransactionDirection.incoming
54 + ? S.of(context).received
55 + : S.of(context).sent) +
56 + (isPending ? S.of(context).pending : ''),
57 + style: TextStyle(
58 + fontSize: 16,
59 + fontWeight: FontWeight.w500,
60 + color: Colors.white)),
61 + Text(formattedAmount,
62 + style: TextStyle(
63 + fontSize: 16,
64 + fontWeight: FontWeight.w500,
65 + color: Colors.white))
66 + ]),
67 + SizedBox(height: 5),
68 + Row(
69 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
70 + children: <Widget>[
71 + Text(formattedDate,
72 + style: TextStyle(
73 + fontSize: 14,
74 + color: Theme.of(context)
75 + .textTheme
76 + .overline
77 + .backgroundColor)),
78 + Text(formattedFiatAmount,
79 + style: TextStyle(
80 + fontSize: 14,
81 + color: Theme.of(context)
82 + .textTheme
83 + .overline
84 + .backgroundColor))
85 + ])
86 + ],
87 + )
88 + )
89 + ],
90 + ),
91 ));
92 }
93 }