Skip to content

Operand of null-aware operation build warning  #107374

@under3415

Description

@under3415

Getting this build warning on flutter 3.0.4 with in_app_purchase 3.0.6/in_app_purchase_android 0.2.3

../../flutter/.pub-cache/hosted/pub.dartlang.org/in_app_purchase_android-0.2.3/lib/src/billing_client_wrappers/purchase_wrapper.g.dart:16:27: Warning: Operand of null-aware operation '?.' has type 'List<dynamic>' which excludes null.
 - 'List' is from 'dart:core'.
          ? (json['skus'] as List)?.map((item) => item as String)?.toList() ??
                          ^
../../flutter/.pub-cache/hosted/pub.dartlang.org/in_app_purchase_android-0.2.3/lib/src/billing_client_wrappers/purchase_wrapper.g.dart:35:27: Warning: Operand of null-aware operation '?.' has type 'List<dynamic>' which excludes null.
 - 'List' is from 'dart:core'.
          ? (json['skus'] as List)?.map((item) => item as String)?.toList() ??

Metadata

Metadata

Labels

P1High-priority issues at the top of the work listfound in release: 3.0Found to occur in 3.0found in release: 3.1Found to occur in 3.1has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: in_app_purchasePlugin for in-app purchasepackageflutter/packages repository. See also p: labels.r: fixedIssue is closed as already fixed in a newer version

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions