felangel / flow_builder

Flutter Flows made easy! A Flutter package which simplifies navigation flows with a flexible, declarative API.
https://pub.dev/packages/flow_builder
MIT License
389 stars 63 forks source link

Flutter build fails after upgrade to flow_builder-0.0.7 #93

Closed GerhardMalan closed 2 years ago

GerhardMalan commented 2 years ago

Describe the bug Flutter build fails after upgrade to flow_builder-0.0.7 from flow_builder-0.0.6.

To Reproduce Steps to reproduce the behavior:

  1. Upgrade to flow_builder-0.0.7 from flow_builder-0.0.6.
  2. Run app (F5)
  3. Build fails with error messages below:
  4. Fixed the problem by directly editing C:\sdk\flutter.pub-cache\hosted\pub.dartlang.org\flow_builder-0.0.7\lib\flow_builder.dart, lines 367 and 372, adding null operator [?] after WidgetsBinding.instance?

/C:/sdk/flutter/.pub-cache/hosted/pub.dartlang.org/flow_builder-0.0.7/lib/flow_builder.dart:367:36: Error: Method 'handlePopRoute' cannot be called on 'WidgetsBinding?' because it is potentially null.

felangel commented 2 years ago

Hi @GerhardMalan 👋 Thanks for opening an issue!

I think this must have been a subtle breaking change introduced in Flutter 3.0.0. Can you upgrade to the latest stable channel of Flutter (3.0.0) and let me know if the issue persists? Thanks and sorry for the inconvenience!

GerhardMalan commented 2 years ago

Sure, we'll have a go. Our app has a fair few library imports, so there may well be other conflicts. Thanks for the quick response.

I'll get back to you after upgrading Felix.

GerhardMalan commented 2 years ago

Ok, that's fixed it, thanks. Have two libraries (latest versions) that compile with warnings due to the now unnecessary null-aware operators on WidgetsBinding.instance, but that's not a big deal for now:

Thanks for the help and quick response Felix!

felangel commented 2 years ago

Ok, that's fixed it, thanks. Have two libraries (latest versions) that compile with warnings due to the now unnecessary null-aware operators on WidgetsBinding.instance, but that's not a big deal for now:

  • flutter_typeahead-3.2.5,
  • cached_network_image-3.2.0

Thanks for the help and quick response Felix!

Awesome, glad to hear it!