Merge pull request #101 from cake-tech/CAKE-302-balance-displaying-bug

CAKE-302 | wrapped Text widgets by Expanded and Row widgets in the ba…
This commit is contained in:
mezzazon 2021-03-29 21:22:32 +03:00 committed by GitHub
commit b7935664a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,3 @@
import 'package:cake_wallet/entities/crypto_currency.dart';
import 'package:flutter/material.dart';
import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart';
import 'package:flutter_mobx/flutter_mobx.dart';
@ -33,8 +32,12 @@ class BalancePage extends StatelessWidget {
}),
SizedBox(height: 10),
Observer(builder: (_) {
return Text(
return Row(
children: [
Expanded(
child: Text(
'${dashboardViewModel.balanceViewModel.availableBalanceLabel} (${dashboardViewModel.balanceViewModel.availableFiatBalance.toString()})',
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
@ -43,6 +46,9 @@ class BalancePage extends StatelessWidget {
.display2
.backgroundColor,
height: 1),
)
)
],
);
}),
SizedBox(height: 10),
@ -62,8 +68,12 @@ class BalancePage extends StatelessWidget {
}),
SizedBox(height: 10),
Observer(builder: (_) {
return Text(
return Row(
children: [
Expanded(
child: Text(
'${dashboardViewModel.balanceViewModel.additionalBalanceLabel} (${dashboardViewModel.balanceViewModel.additionalFiatBalance.toString()})',
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
@ -72,6 +82,9 @@ class BalancePage extends StatelessWidget {
.display2
.backgroundColor,
height: 1),
)
)
],
);
}),
SizedBox(height: 10),