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 thrown when using Dart 2 Preview #24

Closed
mjohnsullivan opened this issue Mar 18, 2018 · 1 comment · Fixed by #20
Closed

Error thrown when using Dart 2 Preview #24

mjohnsullivan opened this issue Mar 18, 2018 · 1 comment · Fixed by #20

Comments

@mjohnsullivan
Copy link

I tried to get the flutter-redux example working with the Dart 2 preview, but I get the following error when I try to run it:

══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
The following NoSuchMethodError was thrown building StoreConnector<int, String>(dirty):
The getter 'store' was called on null.
Receiver: null
Tried calling: store
When the exception was thrown, this was the stack:
#0 Object.noSuchMethod (dart:core/object_patch.dart:46:5)
#1 StoreConnector.build (package:flutter_redux/flutter_redux.dart:156:44)
#2 StatelessElement.build (package:flutter/src/widgets/framework.dart:3678:28)

Works fine when not activating the preview. The Flutter build I'm using is:

Flutter 0.1.5 • channel beta • https://github.com/flutter/flutter.git
Framework • revision 3ea4d06340 (3 weeks ago) • 2018-02-22 11:12:39 -0800
Engine • revision ead227f118
Tools • Dart 2.0.0-dev.28.0.flutter-0b4f01f759

@brianegan
Copy link
Owner

brianegan commented Mar 19, 2018

Hey, thanks for the report! I've got a PR up to fix Dart 2.0: #20

However, it's currently blocked by flutter/flutter#15681

The tests / library are actually all good, but coverage isn't working. To get Redux working with Dart 2, please use the following until that's fixed up and I can publish 0.4.0:

  flutter_redux:
    git:
      url: git://github.com/brianegan/flutter_redux.git
      ref: 0.4.0

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

Successfully merging a pull request may close this issue.

2 participants