Skip to content

Commit 2d2aed2

Browse files
committed
Small clean
1 parent cc23c2a commit 2d2aed2

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

lib/confignodescreen.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,8 @@ class _ConfigScreenState extends State<ConfigScreen> {
322322
},
323323
itemBuilder: (_) => [
324324
new CheckedPopupMenuItem(
325-
checked: _srcname == '',
326-
value: '',
325+
checked: _srcname == 'Undefined',
326+
value: 'Undefined',
327327
child: new Text('None'),
328328
),
329329
new CheckedPopupMenuItem(

lib/nodes.dart

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,26 +61,23 @@ class NodeRecords {
6161
}
6262

6363
Future<bool> findDevices() async {
64-
searchingForDevices = true;
64+
searchingForDevices = true; // global signal
65+
List<String> foundips = [];
66+
67+
// simulate this device
6568
addDevice("192.168.1.96", name: "E131 Linux", type: "Application");
66-
// addDevice("192.168.1.44", name: "Note", type: "Type");
67-
// addDevice("192.168.1.95", name: "Display Name", type: "Board");
68-
var addedAny = false;
6969

70-
// might be required for android et al.
70+
var addedAny = false; // found anything?
71+
72+
// required for android et al.
7173
var factory = (dynamic host, int port,
7274
{bool? reuseAddress, bool? reusePort, int? ttl}) {
7375
var tll = 5;
7476
return RawDatagramSocket.bind(host, port,
7577
reuseAddress: true, reusePort: true, ttl: tll);
7678
};
77-
7879
final MDnsClient client = MDnsClient(rawDatagramSocketFactory: factory);
7980

80-
// final MDnsClient client = MDnsClient();
81-
82-
List<String> foundips = [];
83-
8481
// Search for devices
8582
print("mDNS: Search...");
8683
const String name = '_http._tcp.local';

0 commit comments

Comments
 (0)