From 69cb69bd7173c327526e36b50e46736177501b39 Mon Sep 17 00:00:00 2001 From: OleksandrSobol Date: Fri, 26 Mar 2021 19:46:01 +0200 Subject: [PATCH] CAKE-302 | wrapped Text widgets by Expanded and Row widgets in the balance_page.dart --- .../dashboard/widgets/balance_page.dart | 55 ++++++++++++------- 1 file changed, 34 insertions(+), 21 deletions(-) diff --git a/lib/src/screens/dashboard/widgets/balance_page.dart b/lib/src/screens/dashboard/widgets/balance_page.dart index 2735fd140..415c3907c 100644 --- a/lib/src/screens/dashboard/widgets/balance_page.dart +++ b/lib/src/screens/dashboard/widgets/balance_page.dart @@ -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,16 +32,23 @@ class BalancePage extends StatelessWidget { }), SizedBox(height: 10), Observer(builder: (_) { - return Text( - '${dashboardViewModel.balanceViewModel.availableBalanceLabel} (${dashboardViewModel.balanceViewModel.availableFiatBalance.toString()})', - style: TextStyle( - fontSize: 12, - fontWeight: FontWeight.w600, - color: Theme.of(context) - .accentTextTheme - .display2 - .backgroundColor, - height: 1), + return Row( + children: [ + Expanded( + child: Text( + '${dashboardViewModel.balanceViewModel.availableBalanceLabel} (${dashboardViewModel.balanceViewModel.availableFiatBalance.toString()})', + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + color: Theme.of(context) + .accentTextTheme + .display2 + .backgroundColor, + height: 1), + ) + ) + ], ); }), SizedBox(height: 10), @@ -62,16 +68,23 @@ class BalancePage extends StatelessWidget { }), SizedBox(height: 10), Observer(builder: (_) { - return Text( - '${dashboardViewModel.balanceViewModel.additionalBalanceLabel} (${dashboardViewModel.balanceViewModel.additionalFiatBalance.toString()})', - style: TextStyle( - fontSize: 12, - fontWeight: FontWeight.w600, - color: Theme.of(context) - .accentTextTheme - .display2 - .backgroundColor, - height: 1), + return Row( + children: [ + Expanded( + child: Text( + '${dashboardViewModel.balanceViewModel.additionalBalanceLabel} (${dashboardViewModel.balanceViewModel.additionalFiatBalance.toString()})', + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + color: Theme.of(context) + .accentTextTheme + .display2 + .backgroundColor, + height: 1), + ) + ) + ], ); }), SizedBox(height: 10),