mirror of
https://github.com/localsend/localsend.git
synced 2026-06-23 04:10:07 +00:00
feat: remove unused network mask
This commit is contained in:
@@ -40,7 +40,6 @@
|
||||
"infoBox": {
|
||||
"ip": "IP:",
|
||||
"port": "Port:",
|
||||
"subnetMask": "Subnet mask:",
|
||||
"alias": "Alias:"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
"infoBox": {
|
||||
"ip": "IP:",
|
||||
"port": "Port:",
|
||||
"subnetMask": "Subnetzmaske:",
|
||||
"alias": "Alias:"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -6,6 +6,5 @@ part 'network_info.freezed.dart';
|
||||
class NetworkInfo with _$NetworkInfo {
|
||||
const factory NetworkInfo({
|
||||
required List<String> localIps,
|
||||
required String? netMask, // not used
|
||||
}) = _NetworkInfo;
|
||||
}
|
||||
|
||||
@@ -153,13 +153,6 @@ class _ReceiveTagState extends ConsumerState<ReceiveTab> with AutomaticKeepAlive
|
||||
Text(serverState?.port.toString() ?? '-'),
|
||||
],
|
||||
),
|
||||
TableRow(
|
||||
children: [
|
||||
Text(t.receiveTab.infoBox.subnetMask),
|
||||
const SizedBox(width: 10),
|
||||
Text(networkInfo?.netMask ?? t.general.unknown),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -40,10 +40,8 @@ class NetworkInfoNotifier extends StateNotifier<NetworkInfo?> {
|
||||
Future<NetworkInfo> _getInfo() async {
|
||||
final info = plugin.NetworkInfo();
|
||||
String? ip;
|
||||
String? mask;
|
||||
try {
|
||||
ip = await info.getWifiIP();
|
||||
mask = await info.getWifiSubmask();
|
||||
} catch (e) {
|
||||
print(e);
|
||||
}
|
||||
@@ -60,11 +58,10 @@ class NetworkInfoNotifier extends StateNotifier<NetworkInfo?> {
|
||||
}
|
||||
}
|
||||
|
||||
print('New network state: $ip ($mask)');
|
||||
print('New network state: $ip');
|
||||
|
||||
return NetworkInfo(
|
||||
localIps: rankIpAddresses(nativeResult, ip),
|
||||
netMask: mask,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user