In-app purchase
This commit is contained in:
parent
a4840854da
commit
f9165a8701
|
|
@ -27,6 +27,7 @@ class UpgradeDialog extends StatefulWidget {
|
|||
}
|
||||
|
||||
class _UpgradeDialogState extends State<UpgradeDialog> {
|
||||
final _scrollController = ScrollController();
|
||||
final InAppPurchase _inAppPurchase = InAppPurchase.instance;
|
||||
StreamSubscription<List<PurchaseDetails>> _subscription;
|
||||
List<ProductDetails> _products = <ProductDetails>[];
|
||||
|
|
@ -115,6 +116,7 @@ class _UpgradeDialogState extends State<UpgradeDialog> {
|
|||
iosPlatformAddition.setDelegate(null);
|
||||
}
|
||||
_subscription.cancel();
|
||||
_scrollController.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
|
|
@ -124,7 +126,11 @@ class _UpgradeDialogState extends State<UpgradeDialog> {
|
|||
final List<Widget> stack = <Widget>[];
|
||||
if (_queryProductError == null) {
|
||||
stack.add(
|
||||
ListView(
|
||||
Scrollbar(
|
||||
thumbVisibility: true,
|
||||
controller: _scrollController,
|
||||
child: ListView(
|
||||
controller: _scrollController,
|
||||
children: <Widget>[
|
||||
if (Platform.isIOS)
|
||||
Padding(
|
||||
|
|
@ -137,6 +143,7 @@ class _UpgradeDialogState extends State<UpgradeDialog> {
|
|||
_buildProductList(),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
stack.add(Center(
|
||||
|
|
|
|||
Loading…
Reference in New Issue