refactor: Update to Dart 3.10 with . shorthands

This commit is contained in:
Christian Kußowski 2025-11-30 12:54:06 +01:00
commit 1ea649f01e
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652
167 changed files with 3351 additions and 3912 deletions

View file

@ -33,13 +33,15 @@ class VoipPlugin with WidgetsBindingObserver implements WebRTCDelegate {
@override
void didChangeAppLifecycleState(AppLifecycleState? state) {
background = (state == AppLifecycleState.detached ||
background =
(state == AppLifecycleState.detached ||
state == AppLifecycleState.paused);
}
void addCallingOverlay(String callId, CallSession call) {
final context =
kIsWeb ? ChatList.contextForVoip! : this.context; // web is weird
final context = kIsWeb
? ChatList.contextForVoip!
: this.context; // web is weird
if (overlayEntry != null) {
Logs().e('[VOIP] addCallingOverlay: The call session already exists?');
@ -85,8 +87,7 @@ class VoipPlugin with WidgetsBindingObserver implements WebRTCDelegate {
Future<RTCPeerConnection> createPeerConnection(
Map<String, dynamic> configuration, [
Map<String, dynamic> constraints = const {},
]) =>
webrtc_impl.createPeerConnection(configuration, constraints);
]) => webrtc_impl.createPeerConnection(configuration, constraints);
Future<bool> get hasCallingAccount async => false;