mirror of
https://github.com/flutter/packages.git
synced 2025-06-27 04:37:07 +08:00
[in_app_purchase] Minor lint cleanup (#4818)
Updates some lints for current versions of Flutter, reducing the need for `// ignore`s. Fixes https://github.com/flutter/flutter/issues/131792
This commit is contained in:
@ -1,3 +1,7 @@
|
||||
## 3.1.10
|
||||
|
||||
* Updates example code for current versions of Flutter.
|
||||
|
||||
## 3.1.9
|
||||
|
||||
* Adds pub topics to package metadata.
|
||||
|
@ -164,10 +164,8 @@ class _MyAppState extends State<_MyApp> {
|
||||
}
|
||||
if (_purchasePending) {
|
||||
stack.add(
|
||||
// TODO(goderbauer): Make this const when that's available on stable.
|
||||
// ignore: prefer_const_constructors
|
||||
Stack(
|
||||
children: const <Widget>[
|
||||
const Stack(
|
||||
children: <Widget>[
|
||||
Opacity(
|
||||
opacity: 0.3,
|
||||
child: ModalBarrier(dismissible: false, color: Colors.grey),
|
||||
|
@ -2,7 +2,7 @@ name: in_app_purchase
|
||||
description: A Flutter plugin for in-app purchases. Exposes APIs for making in-app purchases through the App Store and Google Play.
|
||||
repository: https://github.com/flutter/packages/tree/main/packages/in_app_purchase/in_app_purchase
|
||||
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+in_app_purchase%22
|
||||
version: 3.1.9
|
||||
version: 3.1.10
|
||||
|
||||
environment:
|
||||
sdk: ">=2.19.0 <4.0.0"
|
||||
|
@ -1,3 +1,7 @@
|
||||
## 0.3.0+13
|
||||
|
||||
* Updates example code for current versions of Flutter.
|
||||
|
||||
## 0.3.0+12
|
||||
|
||||
* Adds pub topics to package metadata.
|
||||
|
@ -2,8 +2,6 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// ignore_for_file: avoid_print
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
@ -156,10 +154,8 @@ class _MyAppState extends State<_MyApp> {
|
||||
}
|
||||
if (_purchasePending) {
|
||||
stack.add(
|
||||
// TODO(goderbauer): Make this const when that's available on stable.
|
||||
// ignore: prefer_const_constructors
|
||||
Stack(
|
||||
children: const <Widget>[
|
||||
const Stack(
|
||||
children: <Widget>[
|
||||
Opacity(
|
||||
opacity: 0.3,
|
||||
child: ModalBarrier(dismissible: false, color: Colors.grey),
|
||||
|
@ -22,7 +22,6 @@ class InAppPurchaseAndroidPlatformAddition
|
||||
/// this is handled internally and the [enablePendingPurchase] property will
|
||||
/// always return `true`.
|
||||
///
|
||||
// ignore: deprecated_member_use_from_same_package
|
||||
/// See also [enablePendingPurchases] for more on pending purchases.
|
||||
@Deprecated(
|
||||
'The requirement to call `enablePendingPurchases()` has become obsolete '
|
||||
|
@ -2,7 +2,7 @@ name: in_app_purchase_android
|
||||
description: An implementation for the Android platform of the Flutter `in_app_purchase` plugin. This uses the Android BillingClient APIs.
|
||||
repository: https://github.com/flutter/packages/tree/main/packages/in_app_purchase/in_app_purchase_android
|
||||
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+in_app_purchase%22
|
||||
version: 0.3.0+12
|
||||
version: 0.3.0+13
|
||||
|
||||
environment:
|
||||
sdk: ">=2.19.0 <4.0.0"
|
||||
|
@ -33,7 +33,6 @@ void main() {
|
||||
});
|
||||
|
||||
test(
|
||||
// ignore: lines_longer_than_80_chars
|
||||
'Default implementation of purchaseStream should throw unimplemented error',
|
||||
() {
|
||||
final ExtendsInAppPurchasePlatform inAppPurchasePlatform =
|
||||
@ -46,7 +45,6 @@ void main() {
|
||||
});
|
||||
|
||||
test(
|
||||
// ignore: lines_longer_than_80_chars
|
||||
'Default implementation of isAvailable should throw unimplemented error',
|
||||
() {
|
||||
final ExtendsInAppPurchasePlatform inAppPurchasePlatform =
|
||||
@ -59,7 +57,6 @@ void main() {
|
||||
});
|
||||
|
||||
test(
|
||||
// ignore: lines_longer_than_80_chars
|
||||
'Default implementation of queryProductDetails should throw unimplemented error',
|
||||
() {
|
||||
final ExtendsInAppPurchasePlatform inAppPurchasePlatform =
|
||||
@ -72,7 +69,6 @@ void main() {
|
||||
});
|
||||
|
||||
test(
|
||||
// ignore: lines_longer_than_80_chars
|
||||
'Default implementation of buyNonConsumable should throw unimplemented error',
|
||||
() {
|
||||
final ExtendsInAppPurchasePlatform inAppPurchasePlatform =
|
||||
@ -87,7 +83,6 @@ void main() {
|
||||
});
|
||||
|
||||
test(
|
||||
// ignore: lines_longer_than_80_chars
|
||||
'Default implementation of buyConsumable should throw unimplemented error',
|
||||
() {
|
||||
final ExtendsInAppPurchasePlatform inAppPurchasePlatform =
|
||||
@ -102,7 +97,6 @@ void main() {
|
||||
});
|
||||
|
||||
test(
|
||||
// ignore: lines_longer_than_80_chars
|
||||
'Default implementation of completePurchase should throw unimplemented error',
|
||||
() {
|
||||
final ExtendsInAppPurchasePlatform inAppPurchasePlatform =
|
||||
@ -115,7 +109,6 @@ void main() {
|
||||
});
|
||||
|
||||
test(
|
||||
// ignore: lines_longer_than_80_chars
|
||||
'Default implementation of restorePurchases should throw unimplemented error',
|
||||
() {
|
||||
final ExtendsInAppPurchasePlatform inAppPurchasePlatform =
|
||||
|
@ -1,3 +1,7 @@
|
||||
## 0.3.6+7
|
||||
|
||||
* Updates example code for current versions of Flutter.
|
||||
|
||||
## 0.3.6+6
|
||||
|
||||
* Adds pub topics to package metadata.
|
||||
|
@ -156,10 +156,8 @@ class _MyAppState extends State<_MyApp> {
|
||||
}
|
||||
if (_purchasePending) {
|
||||
stack.add(
|
||||
// TODO(goderbauer): Make this const when that's available on stable.
|
||||
// ignore: prefer_const_constructors
|
||||
Stack(
|
||||
children: const <Widget>[
|
||||
const Stack(
|
||||
children: <Widget>[
|
||||
Opacity(
|
||||
opacity: 0.3,
|
||||
child: ModalBarrier(dismissible: false, color: Colors.grey),
|
||||
|
@ -2,8 +2,6 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// ignore_for_file: avoid_print
|
||||
|
||||
import 'package:in_app_purchase_platform_interface/in_app_purchase_platform_interface.dart';
|
||||
import '../in_app_purchase_storekit.dart';
|
||||
|
||||
@ -31,6 +29,7 @@ class InAppPurchaseStoreKitPlatformAddition
|
||||
serverVerificationData: receipt,
|
||||
source: kIAPSource);
|
||||
} catch (e) {
|
||||
// ignore: avoid_print
|
||||
print(
|
||||
'Something is wrong while fetching the receipt, this normally happens when the app is '
|
||||
'running on a simulator: $e');
|
||||
|
@ -2,7 +2,7 @@ name: in_app_purchase_storekit
|
||||
description: An implementation for the iOS and macOS platforms of the Flutter `in_app_purchase` plugin. This uses the StoreKit Framework.
|
||||
repository: https://github.com/flutter/packages/tree/main/packages/in_app_purchase/in_app_purchase_storekit
|
||||
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+in_app_purchase%22
|
||||
version: 0.3.6+6
|
||||
version: 0.3.6+7
|
||||
|
||||
environment:
|
||||
sdk: ">=2.19.0 <4.0.0"
|
||||
|
@ -163,8 +163,6 @@ class FakeStoreKitPlatform {
|
||||
return Future<void>.sync(() {});
|
||||
case '-[InAppPurchasePlugin retrieveReceiptData:result:]':
|
||||
if (receiptData != null) {
|
||||
// TODO(asashour): Remove the `ignore` when Dart 3 reaches stable.
|
||||
// ignore: unnecessary_null_checks
|
||||
return Future<String>.value(receiptData!);
|
||||
} else {
|
||||
throw PlatformException(code: 'no_receipt_data');
|
||||
|
Reference in New Issue
Block a user