diff --git a/lib/pangea/controllers/subscription_controller.dart b/lib/pangea/controllers/subscription_controller.dart index 5b99fc019d..4188abfcab 100644 --- a/lib/pangea/controllers/subscription_controller.dart +++ b/lib/pangea/controllers/subscription_controller.dart @@ -13,6 +13,8 @@ import 'package:fluffychat/pangea/network/requests.dart'; import 'package:fluffychat/pangea/network/urls.dart'; import 'package:fluffychat/pangea/utils/error_handler.dart'; import 'package:fluffychat/pangea/utils/firebase_analytics.dart'; +import 'package:fluffychat/pangea/widgets/subscription/subscription_paywall.dart'; +import 'package:fluffychat/utils/platform_infos.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; @@ -145,18 +147,18 @@ class SubscriptionController extends BaseController { return; } if (!forceShow && isSubscribed) return; - // await showModalBottomSheet( - // isScrollControlled: true, - // useRootNavigator: !PlatformInfos.isMobile, - // clipBehavior: Clip.hardEdge, - // context: context, - // constraints: BoxConstraints( - // maxHeight: PlatformInfos.isMobile ? 600 : 480, - // ), - // builder: (_) => SubscriptionPaywall( - // pangeaController: _pangeaController, - // ), - // ); + await showModalBottomSheet( + isScrollControlled: true, + useRootNavigator: !PlatformInfos.isMobile, + clipBehavior: Clip.hardEdge, + context: context, + constraints: BoxConstraints( + maxHeight: PlatformInfos.isMobile ? 600 : 480, + ), + builder: (_) => SubscriptionPaywall( + pangeaController: _pangeaController, + ), + ); } catch (e, s) { ErrorHandler.logError(e: e, s: s); } diff --git a/lib/pangea/widgets/subscription/subscription_options.dart b/lib/pangea/widgets/subscription/subscription_options.dart index e397712f54..a26d451b7f 100644 --- a/lib/pangea/widgets/subscription/subscription_options.dart +++ b/lib/pangea/widgets/subscription/subscription_options.dart @@ -1,12 +1,10 @@ // Flutter imports: -import 'package:flutter/material.dart'; - -import 'package:flutter_gen/gen_l10n/l10n.dart'; - import 'package:fluffychat/config/app_config.dart'; import 'package:fluffychat/pangea/controllers/pangea_controller.dart'; import 'package:fluffychat/pangea/controllers/subscription_controller.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_gen/gen_l10n/l10n.dart'; class SubscriptionOptions extends StatelessWidget { final PangeaController pangeaController; @@ -17,19 +15,20 @@ class SubscriptionOptions extends StatelessWidget { @override Widget build(BuildContext context) { - return Expanded( + return const Expanded( child: Wrap( alignment: WrapAlignment.center, direction: Axis.horizontal, - children: pangeaController - .subscriptionController.subscription!.availableSubscriptions - .map( - (subscription) => SubscriptionCard( - subscription: subscription, - pangeaController: pangeaController, - ), - ) - .toList(), + children: [], + // pangeaController + // .subscriptionController.subscription!.availableSubscriptions + // .map( + // (subscription) => SubscriptionCard( + // subscription: subscription, + // pangeaController: pangeaController, + // ), + // ) + // .toList(), ), ); }