From b4a454ea116123cb3e5da2e5a578e62d59440d46 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 18 Dec 2023 16:41:57 +0200 Subject: [PATCH] =?UTF-8?q?Center=20the=20=E2=80=98Reports=20is=20not=20en?= =?UTF-8?q?abled=E2=80=99=20message?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/ui/app/help_text.dart | 1 + lib/ui/reports/reports_screen.dart | 42 ++++++++++++++++-------------- 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/lib/ui/app/help_text.dart b/lib/ui/app/help_text.dart index 2b4625866..e0781522d 100644 --- a/lib/ui/app/help_text.dart +++ b/lib/ui/app/help_text.dart @@ -14,6 +14,7 @@ class HelpText extends StatelessWidget { opacity: 0.8, child: Text( message!, + textAlign: TextAlign.center, style: TextStyle( fontSize: 20, color: Colors.grey, diff --git a/lib/ui/reports/reports_screen.dart b/lib/ui/reports/reports_screen.dart index 95e901190..4640f6447 100644 --- a/lib/ui/reports/reports_screen.dart +++ b/lib/ui/reports/reports_screen.dart @@ -434,25 +434,29 @@ class ReportsScreen extends StatelessWidget { ), body: hideReports ? Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - HelpText(localization.upgradeToViewReports), - AppButton( - label: localization.upgrade.toUpperCase(), - onPressed: () { - if (supportsInAppPurchase() && - state.account.canMakeIAP) { - showDialog( - context: context, - builder: (context) => UpgradeDialog(), - ); - } else { - launchUrl( - Uri.parse(state.userCompany.ninjaPortalUrl)); - } - }) - ], + child: mt.Padding( + padding: const EdgeInsets.all(16), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + HelpText(localization.upgradeToViewReports), + SizedBox(height: 10), + AppButton( + label: localization.upgrade.toUpperCase(), + onPressed: () { + if (supportsInAppPurchase() && + state.account.canMakeIAP) { + showDialog( + context: context, + builder: (context) => UpgradeDialog(), + ); + } else { + launchUrl( + Uri.parse(state.userCompany.ninjaPortalUrl)); + } + }) + ], + ), ), ) : ScrollableListView(