File tree Expand file tree Collapse file tree 4 files changed +20
-11
lines changed Expand file tree Collapse file tree 4 files changed +20
-11
lines changed Original file line number Diff line number Diff line change @@ -122,8 +122,8 @@ class _CallSampleState extends State<CallSample> {
122
122
return ListBody (children: < Widget > [
123
123
ListTile (
124
124
title: Text (self
125
- ? peer['name' ] + '[Your self]'
126
- : peer['name' ] + '[' + peer['user_agent' ] + '] ' ),
125
+ ? peer['name' ] + ', ID: ${ peer [ 'id' ]} ' + ' [Your self]'
126
+ : peer['name' ] + ', ID: ${ peer ['id' ]} ' ),
127
127
onTap: null ,
128
128
trailing: SizedBox (
129
129
width: 100.0 ,
@@ -143,7 +143,7 @@ class _CallSampleState extends State<CallSample> {
143
143
tooltip: 'Screen sharing' ,
144
144
)
145
145
])),
146
- subtitle: Text ('id: ' + peer['id' ] ),
146
+ subtitle: Text ('[ ' + peer['user_agent' ] + ']' ),
147
147
),
148
148
Divider ()
149
149
]);
@@ -153,7 +153,8 @@ class _CallSampleState extends State<CallSample> {
153
153
Widget build (BuildContext context) {
154
154
return Scaffold (
155
155
appBar: AppBar (
156
- title: Text ('P2P Call Sample' ),
156
+ title: Text ('P2P Call Sample' +
157
+ (_selfId != null ? ' [Your ID ($_selfId )] ' : '' )),
157
158
actions: < Widget > [
158
159
IconButton (
159
160
icon: const Icon (Icons .settings),
Original file line number Diff line number Diff line change @@ -126,11 +126,11 @@ class _DataChannelSampleState extends State<DataChannelSample> {
126
126
return ListBody (children: < Widget > [
127
127
ListTile (
128
128
title: Text (self
129
- ? peer['name' ] + '[Your self]'
130
- : peer['name' ] + '[' + peer['user_agent' ] + '] ' ),
129
+ ? peer['name' ] + ', ID: ${ peer [ 'id' ]} ' + ' [Your self]'
130
+ : peer['name' ] + ', ID: ${ peer ['id' ]} ' ),
131
131
onTap: () => _invitePeer (context, peer['id' ]),
132
132
trailing: Icon (Icons .sms),
133
- subtitle: Text ('id: ' + peer['id' ] ),
133
+ subtitle: Text ('[ ' + peer['user_agent' ] + ']' ),
134
134
),
135
135
Divider ()
136
136
]);
@@ -140,7 +140,8 @@ class _DataChannelSampleState extends State<DataChannelSample> {
140
140
Widget build (BuildContext context) {
141
141
return Scaffold (
142
142
appBar: AppBar (
143
- title: Text ('Data Channel Sample' ),
143
+ title: Text ('Data Channel Sample' +
144
+ (_selfId != null ? ' [Your ID ($_selfId )] ' : '' )),
144
145
actions: < Widget > [
145
146
IconButton (
146
147
icon: const Icon (Icons .settings),
Original file line number Diff line number Diff line change @@ -2,7 +2,11 @@ import 'dart:io';
2
2
3
3
class DeviceInfo {
4
4
static String get label {
5
- return Platform .localHostname + '(' + Platform .operatingSystem + ")" ;
5
+ return 'Flutter ' +
6
+ Platform .operatingSystem +
7
+ '(' +
8
+ Platform .localHostname +
9
+ ")" ;
6
10
}
7
11
8
12
static String get userAgent {
Original file line number Diff line number Diff line change @@ -3,10 +3,13 @@ import 'dart:html' as HTML;
3
3
4
4
class DeviceInfo {
5
5
static String get label {
6
- return 'Flutter Web ( ' + HTML .window.navigator.userAgent + ' ) ' ;
6
+ return 'Flutter Web' ;
7
7
}
8
8
9
9
static String get userAgent {
10
- return 'flutter-webrtc/web-plugin 0.0.1' ;
10
+ return 'flutter-webrtc/web-plugin 0.0.1 ' +
11
+ ' ( ' +
12
+ HTML .window.navigator.userAgent +
13
+ ' )' ;
11
14
}
12
15
}
You can’t perform that action at this time.
0 commit comments