mirror of
https://github.com/BlueBubblesApp/bluebubbles-app.git
synced 2025-08-06 19:44:08 +08:00
renamed models folder to database
- fix: startup issue
This commit is contained in:
22
lib/database/html/network_tools.dart
Normal file
22
lib/database/html/network_tools.dart
Normal file
@ -0,0 +1,22 @@
|
||||
import 'dart:async';
|
||||
|
||||
/// Shim for NetworkInfo to allow for web compile
|
||||
class HostScanner {
|
||||
/// Obtains the IPv4 address of the connected wifi network
|
||||
static Stream<ActiveHost> scanDevicesForSinglePort(
|
||||
String subnet,
|
||||
int port, {
|
||||
int firstHostId = 1,
|
||||
int lastHostId = 254,
|
||||
Duration timeout = const Duration(milliseconds: 2000),
|
||||
dynamic progressCallback,
|
||||
bool resultsInAddressAscendingOrder = true,
|
||||
}) {
|
||||
final StreamController<ActiveHost> activeHostsController = StreamController<ActiveHost>();
|
||||
return activeHostsController.stream;
|
||||
}
|
||||
}
|
||||
|
||||
class ActiveHost {
|
||||
String address = "";
|
||||
}
|
Reference in New Issue
Block a user