Skip to content

Commit

Permalink
#116 changed Future<Null> to Future due to dart sdk change (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon-Salmon authored and hyochan committed Oct 29, 2019
1 parent ece991f commit 7f00692
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class _InAppState extends State<InApp> {
FlutterInappPurchase.instance.requestPurchase(item.productId);
}
Future<Null> _getProduct() async {
Future _getProduct() async {
List<IAPItem> items = await FlutterInappPurchase.instance.getProducts(_productLists);
for (var item in items) {
print('${item.toString()}');
Expand All @@ -94,7 +94,7 @@ class _InAppState extends State<InApp> {
});
}
Future<Null> _getPurchases() async {
Future _getPurchases() async {
List<PurchasedItem> items =
await FlutterInappPurchase.instance.getAvailablePurchases();
for (var item in items) {
Expand All @@ -108,7 +108,7 @@ class _InAppState extends State<InApp> {
});
}
Future<Null> _getPurchaseHistory() async {
Future _getPurchaseHistory() async {
List<PurchasedItem> items = await FlutterInappPurchase.instance.getPurchaseHistory();
for (var item in items) {
print('${item.toString()}');
Expand Down
6 changes: 3 additions & 3 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class _InAppState extends State<InApp> {
FlutterInappPurchase.instance.requestPurchase(item.productId);
}

Future<Null> _getProduct() async {
Future _getProduct() async {
List<IAPItem> items = await FlutterInappPurchase.instance.getProducts(_productLists);
for (var item in items) {
print('${item.toString()}');
Expand All @@ -118,7 +118,7 @@ class _InAppState extends State<InApp> {
});
}

Future<Null> _getPurchases() async {
Future _getPurchases() async {
List<PurchasedItem> items =
await FlutterInappPurchase.instance.getAvailablePurchases();
for (var item in items) {
Expand All @@ -132,7 +132,7 @@ class _InAppState extends State<InApp> {
});
}

Future<Null> _getPurchaseHistory() async {
Future _getPurchaseHistory() async {
List<PurchasedItem> items = await FlutterInappPurchase.instance.getPurchaseHistory();
for (var item in items) {
print('${item.toString()}');
Expand Down
20 changes: 10 additions & 10 deletions lib/flutter_inapp_purchase.dart
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ class FlutterInappPurchase {
/// Result will be received in `purchaseUpdated` listener or `purchaseError` listener.
///
/// Identical to [requestSubscription] on `iOS`.
Future<Null> requestPurchase(String sku, {
Future requestPurchase(String sku, {
String developerIdAndroid,
String accountIdAndroid,
}) async {
Expand Down Expand Up @@ -250,7 +250,7 @@ class FlutterInappPurchase {
/// **NOTICE** second parameter is required on `Android`.
///
/// Identical to [requestPurchase] on `iOS`.
Future<Null> requestSubscription(String sku,
Future requestSubscription(String sku,
{
String oldSkuAndroid,
int prorationModeAndroid,
Expand Down Expand Up @@ -293,8 +293,8 @@ class FlutterInappPurchase {
/// Add Store Payment (iOS only)
/// Indicates that the App Store purchase should continue from the app instead of the App Store.
///
/// @returns {Future<Null>} will receive result from `purchasePromoted` listener.
Future<Null> requestPromotedProductIOS() async {
/// @returns {Future} will receive result from `purchasePromoted` listener.
Future requestPromotedProductIOS() async {
if (_platform.isIOS) {
return await _channel.invokeMethod('requestPromotedProduct');
}
Expand All @@ -303,8 +303,8 @@ class FlutterInappPurchase {

/// Buy product with offer
///
/// @returns {Future<Null>} will receive result from `purchaseUpdated` listener.
Future<Null> requestProductWithOfferIOS(
/// @returns {Future} will receive result from `purchaseUpdated` listener.
Future requestProductWithOfferIOS(
String sku, String forUser, String withOffer,
) async {
if (_platform.isIOS) {
Expand All @@ -319,8 +319,8 @@ class FlutterInappPurchase {

/// Buy product with quantity
///
/// @returns {Future<Null>} will receive result from `purchaseUpdated` listener.
Future<Null> requestPurchaseWithQuantityIOS(
/// @returns {Future} will receive result from `purchaseUpdated` listener.
Future requestPurchaseWithQuantityIOS(
String sku, int quantity,
) async {
if (_platform.isIOS) {
Expand Down Expand Up @@ -582,7 +582,7 @@ class FlutterInappPurchase {
);
}

Future<Null> _setPurchaseListener() async {
Future _setPurchaseListener() async {
if (_purchaseController == null) {
_purchaseController = new StreamController.broadcast();
}
Expand Down Expand Up @@ -624,7 +624,7 @@ class FlutterInappPurchase {
});
}

Future<Null> _removePurchaseListener() async {
Future _removePurchaseListener() async {
if (_purchaseController != null) {
_purchaseController
..add(null)
Expand Down

0 comments on commit 7f00692

Please sign in to comment.