SipServer.fromMap constructor
SipServer.fromMap(
- Map<String, dynamic> map
)
Implementation
factory SipServer.fromMap(Map<String, dynamic> map) {
return SipServer(
id: map['id'] is String
? int.parse(map['id'] as String)
: map['id'] as int,
domain: map['domain'] as String,
port: map['port'] is String
? int.parse(map['port'] as String)
: map['port'] as int,
outboundProxy: map['outbound_proxy'] as String,
wss: map['wss'] as String,
transport: map['transport'] is String
? int.parse(map['transport'] as String)
: map['transport'] as int,
createdAt: map['created_at'] as String,
project: map['project'] is int
? (map['project'] as int).toString()
: map['project'] as String,
userAgent: map['user_agent'] is int
? (map['user_agent'] as int).toString()
: map['user_agent'] as String,
);
}