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