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

Failed to compile application because of pub.dev/r_scan-0.1.6+1/lib/src/r_scan_view.dart:38:18: Error: Member not found: 'SystemChrome.setEnabledSystemUIOverlays'. #58

Open
t-m-z opened this issue May 13, 2023 · 2 comments · May be fixed by #59

Comments

@t-m-z
Copy link

t-m-z commented May 13, 2023

When trying to compile I receive this message:
_/C:/Users/thoma/AppData/Local/Pub/Cache/hosted/pub.dev/r_scan-0.1.6+1/lib/src/r_scan_view.dart:38:18: Error: Member not found: 'SystemChrome.setEnabledSystemUIOverlays'.
SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.top]);
^^^^^^^^^^^^^^^^^^^^^^^^^^
Target kernel_snapshot failed: Exception

FAILURE: Build failed with an exception.

  • Where:
    Script 'C:\Software\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1159

  • What went wrong:
    Execution failed for task ':app:compileFlutterBuildDebug'.

Process 'command 'C:\Software\flutter\bin\flutter.bat'' finished with non-zero exit value 1

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 2m 19s
Exception: Gradle task assembleDebug failed with exit code 1_

Flutter doctor says:
Flutter (Channel stable, 3.10.0, on Microsoft Windows [Version 10.0.22621.1702], locale en-DE)
• Flutter version 3.10.0 on channel stable at C:\Software\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 84a1e904f4 (4 days ago), 2023-05-09 07:41:44 -0700
• Engine revision d44b5a94c9
• Dart version 3.0.0
• DevTools version 2.23.1

@t-m-z
Copy link
Author

t-m-z commented May 13, 2023

I checked the Internet and found

https://stackoverflow.com/questions/69326384/setenabledsystemuioverlays-is-deprecated-and-shouldnt-be-used-migrate-to-seten

Hence I changed initState() in r_scan_view.dart

  • delete SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.top])
  • insert SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: [SystemUiOverlay.top]);

S-Man42 added a commit to S-Man42/r_scan that referenced this issue May 13, 2023
@S-Man42 S-Man42 linked a pull request May 13, 2023 that will close this issue
@RisingV
Copy link

RisingV commented Sep 23, 2023

same issue.

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