diff --git a/lib/main_view_model.dart b/lib/main_view_model.dart index e09414a..93e94d3 100644 --- a/lib/main_view_model.dart +++ b/lib/main_view_model.dart @@ -1,6 +1,5 @@ import 'dart:io'; import 'dart:math'; - import 'package:flutter/foundation.dart'; import 'package:flutter_callkit_incoming/entities/android_params.dart'; import 'package:flutter_callkit_incoming/entities/call_kit_params.dart'; diff --git a/lib/view/screen/login_screen.dart b/lib/view/screen/login_screen.dart index e000146..cccaad2 100644 --- a/lib/view/screen/login_screen.dart +++ b/lib/view/screen/login_screen.dart @@ -1,6 +1,5 @@ // ignore: avoid_web_libraries_in_flutter import 'dart:io'; - import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:flutter/material.dart'; import 'package:flutter_callkit_incoming/flutter_callkit_incoming.dart'; diff --git a/packages/telnyx_webrtc/lib/model/push_notification.dart b/packages/telnyx_webrtc/lib/model/push_notification.dart index c7eaddc..2b6bea3 100644 --- a/packages/telnyx_webrtc/lib/model/push_notification.dart +++ b/packages/telnyx_webrtc/lib/model/push_notification.dart @@ -18,7 +18,6 @@ class PushMetaData { bool? isAnswer; bool? isDecline; - PushMetaData.fromJson(Map json) { caller_name = json['caller_name']; caller_number = json['caller_number']; diff --git a/packages/telnyx_webrtc/lib/model/verto/receive/received_message_body.dart b/packages/telnyx_webrtc/lib/model/verto/receive/received_message_body.dart index 71cec37..baf0ce4 100644 --- a/packages/telnyx_webrtc/lib/model/verto/receive/received_message_body.dart +++ b/packages/telnyx_webrtc/lib/model/verto/receive/received_message_body.dart @@ -18,8 +18,7 @@ class ReceivedMessage { this.reattachedParams, this.stateParams, this.inviteParams, - this.dialogParams - }); + this.dialogParams}); ReceivedMessage.fromJson(Map json) { jsonrpc = json['jsonrpc']; @@ -33,7 +32,7 @@ class ReceivedMessage { inviteParams = json['params'] != null ? IncomingInviteParams.fromJson(json['params']) : null; - if(json['params']['dialogParams'] != null){ + if (json['params']['dialogParams'] != null) { dialogParams = DialogParams.fromJson(json['params']['dialogParams']); } } @@ -71,16 +70,13 @@ class ReceivedResult { String? sessId; TelnyxSocketError? error; - ReceivedResult( - {this.jsonrpc, - this.id, - this.resultParams}); + ReceivedResult({this.jsonrpc, this.id, this.resultParams}); ReceivedResult.fromJson(Map json) { jsonrpc = json['jsonrpc']; id = json['id']; resultParams = - json['result'] != null ? ResultParams.fromJson(json['result']) : null; + json['result'] != null ? ResultParams.fromJson(json['result']) : null; sessId = json['sessid']; error = json['error'] != null ? TelnyxSocketError.fromJson(json['error']) @@ -104,7 +100,6 @@ class ReceivedResult { } } - class ReattachedParams { List? reattachedSessions; @@ -136,12 +131,11 @@ class ReattachedParams { class ResultParams { StateParams? stateParams; - ResultParams( - {this.stateParams}); + ResultParams({this.stateParams}); ResultParams.fromJson(Map json) { stateParams = - json['params'] != null ? StateParams.fromJson(json['params']) : null; + json['params'] != null ? StateParams.fromJson(json['params']) : null; } Map toJson() { @@ -152,6 +146,7 @@ class ResultParams { return data; } } + class StateParams { String? state; diff --git a/packages/telnyx_webrtc/lib/peer/peer.dart b/packages/telnyx_webrtc/lib/peer/peer.dart index d0a7d4a..bc262d6 100644 --- a/packages/telnyx_webrtc/lib/peer/peer.dart +++ b/packages/telnyx_webrtc/lib/peer/peer.dart @@ -10,9 +10,7 @@ import 'package:telnyx_webrtc/tx_socket.dart' if (dart.library.js) 'package:telnyx_webrtc/tx_socket_web.dart'; import 'package:uuid/uuid.dart'; import 'package:logger/logger.dart'; - import 'package:telnyx_webrtc/model/verto/receive/received_message_body.dart'; - import '../model/call_state.dart'; import '../model/jsonrpc.dart'; @@ -22,8 +20,6 @@ enum SignalingState { ConnectionError, } - - class Session { Session({required this.sid, required this.pid}); diff --git a/packages/telnyx_webrtc/lib/telnyx_client.dart b/packages/telnyx_webrtc/lib/telnyx_client.dart index f15b8eb..e801a94 100644 --- a/packages/telnyx_webrtc/lib/telnyx_client.dart +++ b/packages/telnyx_webrtc/lib/telnyx_client.dart @@ -20,7 +20,6 @@ import 'package:telnyx_webrtc/tx_socket.dart' if (dart.library.js) 'package:telnyx_webrtc/tx_socket_web.dart'; import 'package:uuid/uuid.dart'; import 'package:flutter/foundation.dart'; - import 'model/call_state.dart'; import 'model/jsonrpc.dart'; import 'model/push_notification.dart';