CAKE-302 | wrapped Text widgets by Expanded and Row widgets in the balance_page.dart
OleksandrSobol committed
Mar 26, 2021 at 19:46 UTC
69cb69bd7173c327526e36b50e46736177501b39
1 file changed
+34
-21
lib/src/screens/dashboard/widgets/balance_page.dart
+34
-21
@@ -1,4 +1,3 @@
1
-import 'package:cake_wallet/entities/crypto_currency.dart';
1
import 'package:flutter/material.dart';
2
import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart';
3
import 'package:flutter_mobx/flutter_mobx.dart';
@@ -33,16 +32,23 @@ class BalancePage extends StatelessWidget {
32
}),
33
SizedBox(height: 10),
34
Observer(builder: (_) {
36
- return Text(
37
- '${dashboardViewModel.balanceViewModel.availableBalanceLabel} (${dashboardViewModel.balanceViewModel.availableFiatBalance.toString()})',
38
- style: TextStyle(
39
- fontSize: 12,
40
- fontWeight: FontWeight.w600,
41
- color: Theme.of(context)
42
- .accentTextTheme
43
- .display2
44
- .backgroundColor,
45
- height: 1),
35
+ return Row(
36
+ children: [
37
+ Expanded(
38
+ child: Text(
39
+ '${dashboardViewModel.balanceViewModel.availableBalanceLabel} (${dashboardViewModel.balanceViewModel.availableFiatBalance.toString()})',
40
+ textAlign: TextAlign.center,
41
+ style: TextStyle(
42
+ fontSize: 12,
43
+ fontWeight: FontWeight.w600,
44
+ color: Theme.of(context)
45
+ .accentTextTheme
46
+ .display2
47
+ .backgroundColor,
48
+ height: 1),
49
+ )
50
+ )
51
+ ],
52
);
53
}),
54
SizedBox(height: 10),
@@ -62,16 +68,23 @@ class BalancePage extends StatelessWidget {
68
}),
69
SizedBox(height: 10),
70
Observer(builder: (_) {
65
- return Text(
66
- '${dashboardViewModel.balanceViewModel.additionalBalanceLabel} (${dashboardViewModel.balanceViewModel.additionalFiatBalance.toString()})',
67
- style: TextStyle(
68
- fontSize: 12,
69
- fontWeight: FontWeight.w600,
70
- color: Theme.of(context)
71
- .accentTextTheme
72
- .display2
73
- .backgroundColor,
74
- height: 1),
71
+ return Row(
72
+ children: [
73
+ Expanded(
74
+ child: Text(
75
+ '${dashboardViewModel.balanceViewModel.additionalBalanceLabel} (${dashboardViewModel.balanceViewModel.additionalFiatBalance.toString()})',
76
+ textAlign: TextAlign.center,
77
+ style: TextStyle(
78
+ fontSize: 12,
79
+ fontWeight: FontWeight.w600,
80
+ color: Theme.of(context)
81
+ .accentTextTheme
82
+ .display2
83
+ .backgroundColor,
84
+ height: 1),
85
+ )
86
+ )
87
+ ],
88
);
89
}),
90
SizedBox(height: 10),