I am getting the below issue when I use the camera_with_rtmp as a component. However when I run the example given in the github folder, it seems to be working without issue. I'd appreciate some help. This working yesterday and suddenly it stopped working.
Using hardware rendering with device Android SDK built for x86. If you notice graphics artifacts, consider enabling software rendering with "--enable-software-rendering".
Launching lib\main.dart on Android SDK built for x86 in debug mode...
../../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/camera_with_rtmp-0.3.2/lib/camera.dart:81:49: Error: 'await' can only be used in 'async' or 'async*' methods.
final List<Map<dynamic, dynamic>> cameras = await _channel
^^^^^
../../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/camera_with_rtmp-0.3.2/lib/camera.dart:89:8: Error: A value of type 'List' can't be assigned to a variable of type 'Future<List>'.
'List' is from 'dart:core'.
'CameraDescription' is from 'package:camera_with_rtmp/camera.dart' ('../../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/camera_with_rtmp-0.3.2/lib/camera.dart').
'Future' is from 'dart:async'.
}).toList();
^
FAILURE: Build failed with an exception.
Where:
What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
Process 'command 'C:\Projects\SDK\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.
I am able to bypass this error by directly referring to the project when doing flutter run. The issue most likely seems to be something related to kotlin or other dependencies. Not sure what.
I am getting the below issue when I use the camera_with_rtmp as a component. However when I run the example given in the github folder, it seems to be working without issue. I'd appreciate some help. This working yesterday and suddenly it stopped working.
Using hardware rendering with device Android SDK built for x86. If you notice graphics artifacts, consider enabling software rendering with "--enable-software-rendering". Launching lib\main.dart on Android SDK built for x86 in debug mode... ../../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/camera_with_rtmp-0.3.2/lib/camera.dart:81:49: Error: 'await' can only be used in 'async' or 'async*' methods. final List<Map<dynamic, dynamic>> cameras = await _channel ^^^^^ ../../../SDK/flutter/.pub-cache/hosted/pub.dartlang.org/camera_with_rtmp-0.3.2/lib/camera.dart:89:8: Error: A value of type 'List' can't be assigned to a variable of type 'Future<List>'.
FAILURE: Build failed with an exception.
Where:
What went wrong: Execution failed for task ':app:compileFlutterBuildDebug'.
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.
Get more help at https://help.gradle.org
BUILD FAILED in 14s Running Gradle task 'assembleDebug'... Running Gradle task 'assembleDebug'... Done 15.6s Exception: Gradle task assembleDebug failed with exit code 1