2021年4月5日星期一

Having an issue with square in app payments in flutter

I have added the dependency

square_in_app_payments: ^1.4.0

in my pub spec.yaml and have tried changing my platform: iOS to 11.0 in my PodFile and I continue to get this error:

../../../../../Developer/flutter/.pub-cache/hosted/pub.dartlang.org/square_in_ap  p_payments-1.7.0/lib/in_app_payments.dart:214:21: Error: The operator '[]' isn't  defined for the class 'Object?'.   - 'Object' is from 'dart:core'.                                          Try correcting the operator to an existing operator, or defining a '[]'   operator.            ex.details[InAppPaymentsException.debugCodeKey],                       ^  

The error is also pointing to the bracket but this code isn't my code and I can't find or edit it. I also only get this error when I import:

import 'package:square_in_app_payments/in_app_payments.dart';

However when I comment this import out or import something else like:

import 'package:square_in_app_payments/models.dart';

I don't get the error and my app works fine. Anybody know how to help?

https://stackoverflow.com/questions/66961514/having-an-issue-with-square-in-app-payments-in-flutter April 06, 2021 at 09:04AM

没有评论:

发表评论