sailor icon indicating copy to clipboard operation
sailor copied to clipboard

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

Open 3ph opened this issue 5 years ago • 3 comments

   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!

3ph avatar Jan 30 '20 22:01 3ph

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

yvanvds avatar Feb 02 '20 20:02 yvanvds

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

iamEtornam avatar Feb 06 '20 12:02 iamEtornam

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

egarson avatar Feb 10 '20 14:02 egarson