osociety / network_tools

Networking Tools library which can help you discover open ports, devices on subnet and many other things.
https://pub.dev/packages/network_tools
BSD 3-Clause "New" or "Revised" License
45 stars 13 forks source link

Abstracting services #183

Closed guyluz11 closed 8 months ago

guyluz11 commented 9 months ago

Made services singleton to not use static everywhere and to support instances for the flutter overrides.

Also removed the use of injection and getit packages.

Changed class names: HostScanner --> HostScannerService PortScanner --> PortScannerService

Usage example Old: HostScanner.x(); ARPService.x(); PortScanner.x();

New: HostScannerService.instance.x(); ARPService.instance.x(); PortScannerService.instance.x();

Fix: https://github.com/osociety/network_tools_flutter/issues/38

This pr does not change the package logic.

codecov[bot] commented 9 months ago

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (4332cd4) 76.39% compared to head (be62b4a) 74.14%. Report is 1 commits behind head on dev.

Files Patch % Lines
.../src/services/impls/mdns_scanner_service_impl.dart 28.57% 5 Missing :warning:
lib/src/models/mdns_info.dart 0.00% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #183 +/- ## ========================================== - Coverage 76.39% 74.14% -2.26% ========================================== Files 19 23 +4 Lines 538 553 +15 ========================================== - Hits 411 410 -1 - Misses 127 143 +16 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.