Launching lib\main.dart on 2201117TI in debug mode... Running Gradle task 'assembleDebug'... ../../AppData/Local/Pub/Cache/hosted/pub.dev/agora_uikit-1.3.7/lib/models/agora_rtc_event_handlers.dart:189:7: Error: Type 'LocalVideoStreamError' not found. LocalVideoStreamError error)? onLocalVideoStateChanged; ^^^^^^^^^^^^^^^^^^^^^ ../../AppData/Local/Pub/Cache/hosted/pub.dev/agora_uikit-1.3.7/lib/models/agora_rtc_event_handlers.dart:354:40: Error: Type 'RhythmPlayerErrorType' not found. RhythmPlayerStateType state, RhythmPlayerErrorType errorCode)? ^^^^^^^^^^^^^^^^^^^^^ ../../AppData/Local/Pub/Cache/hosted/pub.dev/agora_uikit-1.3.7/lib/models/agora_rtc_event_handlers.dart:446:7: Error: Type 'LocalAudioStreamError' not found. LocalAudioStreamError error)? onLocalAudioStateChanged; ^^^^^^^^^^^^^^^^^^^^^ ../../AppData/Local/Pub/Cache/hosted/pub.dev/agora_uikit-1.3.7/lib/models/agora_rtc_event_handlers.dart:521:7: Error: Type 'RtmpStreamPublishErrorType' not found. RtmpStreamPublishErrorType errCode)? onRtmpStreamingStateChanged; ^^^^^^^^^^^^^^^^^^^^^^^^^^ ../../AppData/Local/Pub/Cache/hosted/pub.dev/agora_uikit-1.3.7/lib/models/agora_rtc_event_handlers.dart:554:23: Error: Type 'ChannelMediaRelayEvent' not found. final void Function(ChannelMediaRelayEvent code)? onChannelMediaRelayEvent; ^^^^^^^^^^^^^^^^^^^^^^ ../../AppData/Local/Pub/Cache/hosted/pub.dev/agora_uikit-1.3.7/lib/models/agora_rtc_event_handlers.dart:189:7: Error: 'LocalVideoStreamError' isn't a type. LocalVideoStreamError error)? onLocalVideoStateChanged; ^^^^^^^^^^^^^^^^^^^^^ ../../AppData/Local/Pub/Cache/hosted/pub.dev/agora_uikit-1.3.7/lib/models/agora_rtc_event_handlers.dart:354:40: Error: 'RhythmPlayerErrorType' isn't a type. RhythmPlayerStateType state, RhythmPlayerErrorType errorCode)? ^^^^^^^^^^^^^^^^^^^^^ ../../AppData/Local/Pub/Cache/hosted/pub.dev/agora_uikit-1.3.7/lib/models/agora_rtc_event_handlers.dart:446:7: Error: 'LocalAudioStreamError' isn't a type. LocalAudioStreamError error)? onLocalAudioStateChanged; ^^^^^^^^^^^^^^^^^^^^^ ../../AppData/Local/Pub/Cache/hosted/pub.dev/agora_uikit-1.3.7/lib/models/agora_rtc_event_handlers.dart:521:7: Error: 'RtmpStreamPublishErrorType' isn't a type. RtmpStreamPublishErrorType errCode)? onRtmpStreamingStateChanged; ^^^^^^^^^^^^^^^^^^^^^^^^^^ ../../AppData/Local/Pub/Cache/hosted/pub.dev/agora_uikit-1.3.7/lib/models/agora_rtc_event_handlers.dart:554:23: Error: 'ChannelMediaRelayEvent' isn't a type. final void Function(ChannelMediaRelayEvent code)? onChannelMediaRelayEvent; ^^^^^^^^^^^^^^^^^^^^^^ ../../AppData/Local/Pub/Cache/hosted/pub.dev/agora_uikit-1.3.7/lib/controllers/rtc_event_handlers.dart:146:6: Error: No named parameter with the name 'onChannelMediaRelayEvent'. }, onChannelMediaRelayEvent: (code) { ^^^^^^^^^^^^^^^^^^^^^^^^ ../../AppData/Local/Pub/Cache/hosted/pub.dev/agora_rtc_engine-6.3.0/lib/src/agora_rtc_engine.dart:1576:9: Context: Found this candidate, but the arguments don't match. const RtcEngineEventHandler({ ^^^^^^^^^^^^^^^^^^^^^ Target kernel_snapshot failed: Exception
FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ':app:compileFlutterBuildDebug'.
Process 'command 'C:\Users\kgour\Downloads\flutter_windows_3.19.1-stable\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.
- Get more help at https://help.gradle.org
BUILD FAILED in 11s Error: Gradle task assembleDebug failed with exit code 1
Here is the code where i have used agora ui kit.
import 'package:flutter/cupertino.dart';
import 'package:agora_uikit/agora_uikit.dart';
import 'package:flutter/material.dart';
class VideoCallScreen extends StatefulWidget{
const VideoCallScreen({Key? key}): super(key: key);
@override
State<VideoCallScreen> createState() => _VideoCallScreenState();
}
class _VideoCallScreenState extends State<VideoCallScreen>{
final AgoraClient _client = AgoraClient(agoraConnectionData: AgoraConnectionData(
appId: '305587582691460b8345fcdb4542463b',
channelName: 'fluttering',
tempToken: '007',
),);
@override
void initState() {
super.initState();
_initAgora();
}
Future<void>_initAgora() async{
await _client.initialize();
}
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async => false,
child: Scaffold(
appBar: AppBar(
automaticallyImplyLeading: false,
title: Text('Video Call'),
),
body: SafeArea(
child: Stack(
children: [
AgoraVideoViewer(client: _client, layoutType: Layout.floating, showNumberOfUsers: true,),
AgoraVideoButtons(client: _client, enabledButtons: [
BuiltInButtons.toggleCamera,
BuiltInButtons.callEnd,
BuiltInButtons.toggleMic,
],),
],
),
),
),
);
}
}