VideoUIKit-Flutter
VideoUIKit-Flutter copied to clipboard
[BUG]
i'm building an app on flutterflow and i've built this widget
// Automatic FlutterFlow imports import '/flutter_flow/flutter_flow_theme.dart'; import '/flutter_flow/flutter_flow_util.dart'; import '/custom_code/widgets/index.dart'; // Imports other custom widgets import '/flutter_flow/custom_functions.dart'; // Imports custom functions import 'package:flutter/material.dart'; // Begin custom widget code // DO NOT REMOVE OR MODIFY THE CODE ABOVE!
import 'package:agora_uikit/agora_uikit.dart'; import 'package:agora_rtc_engine/agora_rtc_engine.dart'; import 'dart:async';
class VideoCall extends StatefulWidget { const VideoCall({ super.key, this.width, this.height, });
final double? width; final double? height;
@override State<VideoCall> createState() => _VideoCallState(); }
class _VideoCallState extends State<VideoCall> { final AgoraClient client = AgoraClient( agoraConnectionData: AgoraConnectionData( appId: "2416802168934ee69b03279b26c91b4f", channelName: FFAppState().callID, ), agoraEventHandlers: AgoraRtcEventHandlers( onUserOffline: (connection, remoteUid, reason) => update(), ), );
Timer? statusCheckTimer;
// Initialize the Agora Engine @override void initState() { super.initState(); initAgora(); startStatusCheck(); }
void initAgora() async { await client.initialize(); }
void startStatusCheck() { statusCheckTimer = Timer.periodic(Duration(seconds: 1), (timer) { print("Checking status... ${FFAppState().status}"); if (FFAppState().status == 3) { print("Status is 3, leaving channel..."); timer.cancel(); client.engine.leaveChannel(); Navigator.of(context).pop(); } }); }
@override void dispose() { // Always cancel the timer to prevent memory leaks statusCheckTimer?.cancel(); client.engine.leaveChannel(); super.dispose(); }
@override Widget build(BuildContext context) { return Container( child: Stack(children: [ AgoraVideoViewer(client: client), AgoraVideoButtons(client: client), ]), ); } }
Future update() async { FFAppState().update(() { FFAppState().status = 3; }); }
yesterday, and for 2 previous weeks everything worked fine, but today i'm having this issues
Error: Command failed: flutter build apk --no-pub --no-version-check /opt/.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; ^^^^^^^^^^^^^^^^^^^^^ /opt/.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)? ^^^^^^^^^^^^^^^^^^^^^ /opt/.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; ^^^^^^^^^^^^^^^^^^^^^ /opt/.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; ^^^^^^^^^^^^^^^^^^^^^^^^^^ /opt/.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; ^^^^^^^^^^^^^^^^^^^^^^ /opt/.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; ^^^^^^^^^^^^^^^^^^^^^ /opt/.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)? ^^^^^^^^^^^^^^^^^^^^^ /opt/.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; ^^^^^^^^^^^^^^^^^^^^^ /opt/.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; ^^^^^^^^^^^^^^^^^^^^^^^^^^ /opt/.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; ^^^^^^^^^^^^^^^^^^^^^^ /opt/.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) { ^^^^^^^^^^^^^^^^^^^^^^^^ /opt/.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({ ^^^^^^^^^^^^^^^^^^^^^ and package on pub.dev is now red and says "ERROR: The named parameter 'onChannelMediaRelayEvent' isn't defined. ERROR: Undefined class 'LocalVideoStreamError'."
I've tried changing dependecies versions, but nothing helps
dependencies - agora_uikit: ^1.3.7, agora_rtc_engine: ^6.2.2