Center the ‘Reports is not enabled’ message
This commit is contained in:
parent
a4bc404b4d
commit
b4a454ea11
|
|
@ -14,6 +14,7 @@ class HelpText extends StatelessWidget {
|
|||
opacity: 0.8,
|
||||
child: Text(
|
||||
message!,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
color: Colors.grey,
|
||||
|
|
|
|||
|
|
@ -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<void>(
|
||||
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<void>(
|
||||
context: context,
|
||||
builder: (context) => UpgradeDialog(),
|
||||
);
|
||||
} else {
|
||||
launchUrl(
|
||||
Uri.parse(state.userCompany.ninjaPortalUrl));
|
||||
}
|
||||
})
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
: ScrollableListView(
|
||||
|
|
|
|||
Loading…
Reference in New Issue