[Bug]: network_info_plus Linux getWifiSubmask wrong for /22
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 64/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- dart
- Domain
- networking
Research direction
Start at the Linux implementation of NetworkInfo.getWifiSubmask and compare its handling of the prefix reported by ip -4 addr show. Reproduce the issue on a /22 network and verify that the method returns 255.255.252.0 rather than 255.255.63.0; done means the reported subnet mask matches the OS value.
Written by the indexing model from the issue text.
Description
Platform
Linux Ubuntu
Plugin
network_info_plus
Version
8.2.1
Flutter SDK
3.44.2
Steps to reproduce
Preconditions
- Linux Desktop
- Wi-Fi on a network whose prefix is not /8, /16 or /24 (I.e. Deco /22 -> mask
255.255.252.0)
Steps
- Confirm the real mask from the OS:
ip -4 addr show
Expect something like: inet 192.168.68.x/22 → mask 255.255.252.0.
Run a Flutter Linux app that calls:
final info = NetworkInfo();
print(await info.getWifiIP());
print(await info.getWifiSubmask());
Expected
getWifiSubmask() → 255.255.252.0 (same as /22)
Actual
getWifiSubmask() → 255.255.63.0
Code Sample
final info = NetworkInfo();
print(await info.getWifiIP());
print(await info.getWifiSubmask());
Logs
N/A
Flutter Doctor
flutter doctor -v
[✓] Flutter (Channel stable, 3.44.2, on Ubuntu 26.04 LTS 7.0.0-28-generic, locale en_US.UTF-8) [54ms]
• Flutter version 3.44.2 on channel stable at /home/redge/fvm/versions/3.44.2
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision c9a6c48423 (7 weeks ago), 2026-06-10 15:52:41 -0700
• Engine revision 77e2e94772
• Dart version 3.12.2
• DevTools version 2.57.0
• Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios,
cli-animations, enable-native-assets, enable-swift-package-manager, omit-legacy-version-file, enable-lldb-debugging,
enable-uiscene-migration
[✗] Android toolchain - develop for Android devices [71ms]
✗ Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/to/linux-android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, please use
`flutter config --android-sdk` to update to that location.
[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome) [20ms]
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Linux toolchain - develop for Linux desktop [407ms]
• Ubuntu clang version 21.1.8 (6ubuntu1)
• cmake version 4.2.3
• ninja version 1.13.2
• pkg-config version 2.5.1
! Unable to access driver information using 'eglinfo'.
It is likely available from your distribution (e.g.: apt install mesa-utils)
[✓] Connected device (1 available) [187ms]
• Linux (desktop) • linux • linux-x64 • Ubuntu 26.04 LTS 7.0.0-28-generic
[✓] Network resources [823ms]
• All expected network resources are available.
Checklist before submitting a bug
- I searched issues in this repository and couldn't find such bug/problem
- I Google'd a solution and I couldn't find it
- I searched on StackOverflow for a solution and I couldn't find it
- I read the README.md file of the plugin
- I'm using the latest version of the plugin
- All dependencies are up to date with
flutter pub upgrade - I did a
flutter clean - I tried running the example project
- Dominant language
- Dart
- Stars
- 1.9k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from fluttercommunity/plus_plugins
-
bug triage
Difficulty 1/5 Under an hour Newbie friendliness 88/100
fluttercommunity/plus_plugins#3964 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
fluttercommunity/plus_plugins#3943 ·
-
enhancement triage
Difficulty 4/5 3-5 days Newbie friendliness 55/100
fluttercommunity/plus_plugins#3976 · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
fluttercommunity/plus_plugins#3974 ·
-
enhancement triage
Difficulty 5/5 Over a week Newbie friendliness 48/100
fluttercommunity/plus_plugins#3973 ·
All issues in fluttercommunity/plus_plugins
Similar issues
-
improvement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
linagora/tmail-flutter#4849 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
mlcommons/mobile_app_open#1182 ·
-
[Bug] Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
bggRGjQaUbCoE/PiliPlus#3048 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
zulip/zulip-flutter#2466 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100