rhymelph / r_scan

📷🖨Flutter二维码&条形码扫描插件,支持相机、文件、链接、Uint8List类型扫描
https://juejin.im/post/5dd8efb1e51d452314438515
BSD 3-Clause "New" or "Revised" License
119 stars 79 forks source link

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 1 year ago

t-m-z commented 1 year ago

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.

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 commented 1 year ago

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

RisingV commented 1 year ago

same issue.