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> {
122122 return ListBody (children: < Widget > [
123123 ListTile (
124124 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' ]} ' ),
127127 onTap: null ,
128128 trailing: SizedBox (
129129 width: 100.0 ,
@@ -143,7 +143,7 @@ class _CallSampleState extends State<CallSample> {
143143 tooltip: 'Screen sharing' ,
144144 )
145145 ])),
146- subtitle: Text ('id: ' + peer['id' ] ),
146+ subtitle: Text ('[ ' + peer['user_agent' ] + ']' ),
147147 ),
148148 Divider ()
149149 ]);
@@ -153,7 +153,8 @@ class _CallSampleState extends State<CallSample> {
153153 Widget build (BuildContext context) {
154154 return Scaffold (
155155 appBar: AppBar (
156- title: Text ('P2P Call Sample' ),
156+ title: Text ('P2P Call Sample' +
157+ (_selfId != null ? ' [Your ID ($_selfId )] ' : '' )),
157158 actions: < Widget > [
158159 IconButton (
159160 icon: const Icon (Icons .settings),
Original file line number Diff line number Diff line change @@ -126,11 +126,11 @@ class _DataChannelSampleState extends State<DataChannelSample> {
126126 return ListBody (children: < Widget > [
127127 ListTile (
128128 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' ]} ' ),
131131 onTap: () => _invitePeer (context, peer['id' ]),
132132 trailing: Icon (Icons .sms),
133- subtitle: Text ('id: ' + peer['id' ] ),
133+ subtitle: Text ('[ ' + peer['user_agent' ] + ']' ),
134134 ),
135135 Divider ()
136136 ]);
@@ -140,7 +140,8 @@ class _DataChannelSampleState extends State<DataChannelSample> {
140140 Widget build (BuildContext context) {
141141 return Scaffold (
142142 appBar: AppBar (
143- title: Text ('Data Channel Sample' ),
143+ title: Text ('Data Channel Sample' +
144+ (_selfId != null ? ' [Your ID ($_selfId )] ' : '' )),
144145 actions: < Widget > [
145146 IconButton (
146147 icon: const Icon (Icons .settings),
Original file line number Diff line number Diff line change @@ -2,7 +2,11 @@ import 'dart:io';
22
33class DeviceInfo {
44 static String get label {
5- return Platform .localHostname + '(' + Platform .operatingSystem + ")" ;
5+ return 'Flutter ' +
6+ Platform .operatingSystem +
7+ '(' +
8+ Platform .localHostname +
9+ ")" ;
610 }
711
812 static String get userAgent {
Original file line number Diff line number Diff line change @@ -3,10 +3,13 @@ import 'dart:html' as HTML;
33
44class DeviceInfo {
55 static String get label {
6- return 'Flutter Web ( ' + HTML .window.navigator.userAgent + ' ) ' ;
6+ return 'Flutter Web' ;
77 }
88
99 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+ ' )' ;
1114 }
1215}
You can’t perform that action at this time.
0 commit comments