Skip to content

Commit

Permalink
Merge pull request #65 from team-telnyx/IS/Fix/implementation
Browse files Browse the repository at this point in the history
Refactor imports
  • Loading branch information
isaacakakpo1 authored Sep 24, 2024
2 parents 6976ad8 + 7476824 commit 07df5d5
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 20 deletions.
1 change: 0 additions & 1 deletion lib/main_view_model.dart
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
1 change: 0 additions & 1 deletion lib/view/screen/login_screen.dart
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
1 change: 0 additions & 1 deletion packages/telnyx_webrtc/lib/model/push_notification.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class PushMetaData {
bool? isAnswer;
bool? isDecline;


PushMetaData.fromJson(Map<dynamic, dynamic> json) {
caller_name = json['caller_name'];
caller_number = json['caller_number'];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ class ReceivedMessage {
this.reattachedParams,
this.stateParams,
this.inviteParams,
this.dialogParams
});
this.dialogParams});

ReceivedMessage.fromJson(Map<String, dynamic> json) {
jsonrpc = json['jsonrpc'];
Expand All @@ -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']);
}
}
Expand Down Expand Up @@ -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<String, dynamic> 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'])
Expand All @@ -104,7 +100,6 @@ class ReceivedResult {
}
}


class ReattachedParams {
List<dynamic>? reattachedSessions;

Expand Down Expand Up @@ -136,12 +131,11 @@ class ReattachedParams {
class ResultParams {
StateParams? stateParams;

ResultParams(
{this.stateParams});
ResultParams({this.stateParams});

ResultParams.fromJson(Map<String, dynamic> json) {
stateParams =
json['params'] != null ? StateParams.fromJson(json['params']) : null;
json['params'] != null ? StateParams.fromJson(json['params']) : null;
}

Map<String, dynamic> toJson() {
Expand All @@ -152,6 +146,7 @@ class ResultParams {
return data;
}
}

class StateParams {
String? state;

Expand Down
4 changes: 0 additions & 4 deletions packages/telnyx_webrtc/lib/peer/peer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -22,8 +20,6 @@ enum SignalingState {
ConnectionError,
}



class Session {
Session({required this.sid, required this.pid});

Expand Down
1 change: 0 additions & 1 deletion packages/telnyx_webrtc/lib/telnyx_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 07df5d5

Please sign in to comment.