Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Property 'count' cannot be accessed on 'JSValuePointer?' because it is potentially null. #10

Open
Gursewak-Uppal opened this issue Jan 12, 2022 · 0 comments

Comments

@Gursewak-Uppal
Copy link

I have following error after migrate to null safety .

lib/js/js_engine.dart:71:32: Error: Property 'count' cannot be accessed on 'JSValuePointer?' because it is potentially null.
 - 'JSValuePointer' is from 'package:myApp/js/js_core_mock.dart' ('lib/js/js_core_mock.dart').
Try accessing using ?. instead.
      if (jsContext!.exception.count > 0) {
                               ^^^^^
lib/js/js_engine.dart:71:38: Error: Operator '>' cannot be called on 'int?' because it is potentially null.
      if (jsContext!.exception.count > 0) {
                                     ^
lib/js/js_engine.dart:72:50: Error: Property 'count' cannot be accessed on 'JSValuePointer?' because it is potentially null.
 - 'JSValuePointer' is from 'package:myApp/js/js_core_mock.dart' ('lib/js/js_core_mock.dart').
Try accessing using ?. instead.
        for (int i = 0; i < jsContext!.exception.count; i++)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant