|
|
|
|
@ -13,20 +13,7 @@ class SettingsSubscriptionView extends StatelessWidget {
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return Scaffold(
|
|
|
|
|
appBar: AppBar(
|
|
|
|
|
centerTitle: true,
|
|
|
|
|
title: Text(
|
|
|
|
|
L10n.of(context)!.subscriptionManagement,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
body: ListTileTheme(
|
|
|
|
|
iconColor: Theme.of(context).textTheme.bodyLarge!.color,
|
|
|
|
|
child: MaxWidthBody(
|
|
|
|
|
child: !(controller.subscriptionController.isSubscribed)
|
|
|
|
|
? ChangeSubscription(controller: controller)
|
|
|
|
|
: Column(
|
|
|
|
|
children: [
|
|
|
|
|
final List<Widget> managementButtons = [
|
|
|
|
|
if (controller.currentSubscriptionAvailable)
|
|
|
|
|
ListTile(
|
|
|
|
|
title: Text(L10n.of(context)!.currentSubscription),
|
|
|
|
|
@ -54,8 +41,7 @@ class SettingsSubscriptionView extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
ListTile(
|
|
|
|
|
title: Text(L10n.of(context)!.paymentHistory),
|
|
|
|
|
trailing:
|
|
|
|
|
const Icon(Icons.keyboard_arrow_right_outlined),
|
|
|
|
|
trailing: const Icon(Icons.keyboard_arrow_right_outlined),
|
|
|
|
|
onTap: () => controller.launchMangementUrl(
|
|
|
|
|
ManagementOption.history,
|
|
|
|
|
),
|
|
|
|
|
@ -63,11 +49,29 @@ class SettingsSubscriptionView extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(height: 50),
|
|
|
|
|
if (!(controller.showManagementOptions))
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
return Scaffold(
|
|
|
|
|
appBar: AppBar(
|
|
|
|
|
centerTitle: true,
|
|
|
|
|
title: Text(
|
|
|
|
|
L10n.of(context)!.subscriptionManagement,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
body: ListTileTheme(
|
|
|
|
|
iconColor: Theme.of(context).textTheme.bodyLarge!.color,
|
|
|
|
|
child: MaxWidthBody(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
if (controller.subscriptionController.isSubscribed &&
|
|
|
|
|
!controller.showManagementOptions)
|
|
|
|
|
ManagementNotAvailableWarning(
|
|
|
|
|
controller: controller,
|
|
|
|
|
),
|
|
|
|
|
if (!(controller.subscriptionController.isSubscribed) ||
|
|
|
|
|
controller.isNewUserTrial)
|
|
|
|
|
ChangeSubscription(controller: controller),
|
|
|
|
|
if (controller.showManagementOptions) ...managementButtons,
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
|