Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(network_info_plus): add ipv6, gateway, broadcast and subnet mask information #355

Merged
merged 11 commits into from
Aug 18, 2021

Conversation

v-apparence
Copy link
Contributor

Description

We added for both iOS and Android support for fetching information :

  • IPv6 address
  • Broadcast address
  • Gateway address
  • Subnet mask

Linux, MacOS and Windows was not done in this PR and need help 👍

Related Issues

#206
#132

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]).
This will ensure a smooth and quick review process. Updating the pubspec.yaml and changelogs is not required.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
  • No, this is not a breaking change.

@mhadaily
Copy link
Member

mhadaily commented Jul 9, 2021

Looks like there are some issues with formating.

@mhadaily
Copy link
Member

mhadaily commented Jul 9, 2021

I have reviewed this code and LGTM. thank you for your PR. I feel this is a great addition to network_info plus.

@jpnurmi @miquelbeltran any comment or concerns?

@miquelbeltran
Copy link
Member

changes look good to me! the formatting needs to be fixed, yes

@ghost
Copy link

ghost commented Jul 9, 2021

Hi, we can't get melos run formatto work... we had on both computer (even after a fresh clean clone) this error:

Unhandled exception:
ProcessException: No such file or directory
# [...]
#0      _ProcessImpl._start (dart:io-patch/process_patch.dart:390:33)
#1      Process.start (dart:io-patch/process_patch.dart:36:20)
#2      ProcessRunner.runAndStream (package:flutter_plugin_tools/src/common/process_runner.dart:37:49)
#3      FormatCommand._formatCppAndObjectiveC (package:flutter_plugin_tools/src/format_command.dart:108:27)
<asynchronous suspension>
#4      FormatCommand.run (package:flutter_plugin_tools/src/format_command.dart:48:5)
<asynchronous suspension>
#5      CommandRunner.runCommand (package:args/command_runner.dart:196:13)
<asynchronous suspension>
#6      main.<anonymous closure> (package:flutter_plugin_tools/src/main.dart)
<asynchronous suspension>

Do you had some clues @mhadaily @miquelbeltran ?
Thanks

@stuartmorgan
Copy link

@dim-apparence It looks like you don't have clang-format in your path. If you update to the version of flutter_plugin_tools that was just pushed, you should get a clear error message instead of that stack.

@v-apparence
Copy link
Contributor Author

Thanks @stuartmorgan, melos run format works 👍

@mhadaily
Copy link
Member

@v-apparence this is great so far.

There is one thing that our code coverage deceased a bit I can see why it happens though.

@miquelbeltran @jpnurmi any comment, if not, let's merge and publish this

@mhadaily
Copy link
Member

mhadaily commented Aug 4, 2021

@miquelbeltran @jpnurmi I am going to merge this PR, even though it has lower test coverage, do you have any objection to this?

@miquelbeltran
Copy link
Member

@mhadaily yes, let's go for it!

@mhadaily mhadaily merged commit bd0262e into fluttercommunity:main Aug 18, 2021
#ifndef getgateway_h
#define getgateway_h

int getDefaultGateway(in_addr_t* addr);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this type coming from?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants