From d488ec13b84770647261bddd3cb85125e8573431 Mon Sep 17 00:00:00 2001 From: ggurdin Date: Tue, 16 Jan 2024 15:09:20 -0500 Subject: [PATCH] removed expanded widget --- .../controllers/subscription_controller.dart | 4 +-- .../subscription/subscription_options.dart | 27 +++++++++---------- .../subscription/subscription_paywall.dart | 16 +++++------ 3 files changed, 22 insertions(+), 25 deletions(-) diff --git a/lib/pangea/controllers/subscription_controller.dart b/lib/pangea/controllers/subscription_controller.dart index 58ff72f8a5..1c3d6abfec 100644 --- a/lib/pangea/controllers/subscription_controller.dart +++ b/lib/pangea/controllers/subscription_controller.dart @@ -152,8 +152,8 @@ class SubscriptionController extends BaseController { useRootNavigator: !PlatformInfos.isMobile, clipBehavior: Clip.hardEdge, context: context, - constraints: const BoxConstraints( - maxHeight: 600, + constraints: BoxConstraints( + maxHeight: PlatformInfos.isMobile ? 600 : 450, ), builder: (_) { return SubscriptionPaywall( diff --git a/lib/pangea/widgets/subscription/subscription_options.dart b/lib/pangea/widgets/subscription/subscription_options.dart index 895f624610..7fb7c944ea 100644 --- a/lib/pangea/widgets/subscription/subscription_options.dart +++ b/lib/pangea/widgets/subscription/subscription_options.dart @@ -15,21 +15,18 @@ class SubscriptionOptions extends StatelessWidget { @override Widget build(BuildContext context) { - return const Expanded( - child: Wrap( - alignment: WrapAlignment.center, - direction: Axis.horizontal, - children: [], - // children: pangeaController - // .subscriptionController.subscription!.availableSubscriptions - // .map( - // (subscription) => SubscriptionCard( - // subscription: subscription, - // pangeaController: pangeaController, - // ), - // ) - // .toList(), - ), + return Wrap( + alignment: WrapAlignment.center, + direction: Axis.horizontal, + children: pangeaController + .subscriptionController.subscription!.availableSubscriptions + .map( + (subscription) => SubscriptionCard( + subscription: subscription, + pangeaController: pangeaController, + ), + ) + .toList(), ); } } diff --git a/lib/pangea/widgets/subscription/subscription_paywall.dart b/lib/pangea/widgets/subscription/subscription_paywall.dart index 032ce1b4a3..b6b628c083 100644 --- a/lib/pangea/widgets/subscription/subscription_paywall.dart +++ b/lib/pangea/widgets/subscription/subscription_paywall.dart @@ -31,14 +31,14 @@ class SubscriptionPaywall extends StatelessWidget { padding: const EdgeInsets.all(20), child: ListView( children: [ - // if (pangeaController.matrixState.client.rooms.length > 1) ...[ - // Text( - // L10n.of(context)!.welcomeBack, - // textAlign: TextAlign.center, - // style: const TextStyle(fontSize: 16), - // ), - // const SizedBox(height: 20), - // ], + if (pangeaController.matrixState.client.rooms.length > 1) ...[ + Text( + L10n.of(context)!.welcomeBack, + textAlign: TextAlign.center, + style: const TextStyle(fontSize: 16), + ), + const SizedBox(height: 20), + ], Text( L10n.of(context)!.subscriptionDesc, textAlign: TextAlign.center,