modal tests
This commit is contained in:
parent
012b3fde1f
commit
5418df243d
2 changed files with 26 additions and 21 deletions
|
|
@ -13,7 +13,7 @@ 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/utils/platform_infos.dart';
|
||||
import 'package:fluffychat/pangea/widgets/subscription/subscription_paywall.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
|
@ -147,17 +147,23 @@ class SubscriptionController extends BaseController {
|
|||
}
|
||||
if (!forceShow && isSubscribed) return;
|
||||
await showModalBottomSheet(
|
||||
isScrollControlled: true,
|
||||
useRootNavigator: !PlatformInfos.isMobile,
|
||||
clipBehavior: Clip.hardEdge,
|
||||
// isScrollControlled: true,
|
||||
// useRootNavigator: !PlatformInfos.isMobile,
|
||||
// clipBehavior: Clip.hardEdge,
|
||||
context: context,
|
||||
constraints: BoxConstraints(
|
||||
maxHeight: PlatformInfos.isMobile ? 600 : 480,
|
||||
),
|
||||
builder: (_) => const SizedBox.shrink(),
|
||||
// SubscriptionPaywall(
|
||||
// pangeaController: _pangeaController,
|
||||
// constraints: BoxConstraints(
|
||||
// maxHeight: PlatformInfos.isMobile ? 600 : 480,
|
||||
// ),
|
||||
builder: (_) {
|
||||
try {
|
||||
return SubscriptionPaywall(
|
||||
pangeaController: _pangeaController,
|
||||
);
|
||||
} catch (err) {
|
||||
print("error build modal bottom sheet: $err");
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
},
|
||||
);
|
||||
} catch (e, s) {
|
||||
ErrorHandler.logError(e: e, s: s);
|
||||
|
|
|
|||
|
|
@ -15,20 +15,19 @@ class SubscriptionOptions extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const Expanded(
|
||||
return 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(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue