gurleensethi / sailor

Easy page navigation and management in Flutter apps.
https://pub.dev/packages/sailor
MIT License
145 stars 24 forks source link

Error: This expression has type 'void' and can't be used. #26

Open 3ph opened 4 years ago

3ph commented 4 years ago
   Compiler message:
    ../../../flutter/.pub-cache/hosted/pub.dartlang.org/sailor-0.6.0/lib/src/sailor.dart:429:43: Error: This expression has type 'void' and can't be used.
        return this.navigatorKey.currentState.pop(result);
                                              ^

Flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, v1.14.7-pre.52, on Mac OS X 10.14.6 18G2022, locale en-AU)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.2.1)
[✓] Android Studio (version 3.5)
[✓] VS Code (version 1.41.1)
[✓] Connected device (2 available)

• No issues found!
yvanvds commented 4 years ago

I can confirm this happens in the flutter master channel. It is not a problem in the stable channel right now.

iamEtornam commented 4 years ago

I am facing the same issue. Is there a fix?

egarson commented 4 years ago

Hi, This can be resolved by removing the return statement in the pop function (in sailor.dart) of whatever version of sailor you are using (0.6.0 is line 429 fwiw). @CasperPas thanks for doing the pull request (I just saw and updated this comment). Cheers