This PR adapts the connectivity service of the app to use the internet_connection_checker_plus package, which provides more robust connectivity checking by not only checking for network connectivity, but also pinging the internet to ensure the app can actually access external resources.
Description
This PR addresses the issue of the app's current connectivity service, which only checks for network connectivity without verifying the app's ability to access the internet. The changes made in this PR replace the existing ConnectivityService with a new implementation that uses the internet_connection_checker_plus package.
The new ConnectivityProvider now listens to the stream of connectivity status from the internet_connection_checker_plus package and transforms it into a stream of ConnectivityStatus values, which can be consumed by the rest of the app.
This approach provides a more reliable way to determine the app's connectivity status, as it not only checks for network availability but also verifies the app's ability to access external resources by pinging the internet.
Tests
🧪 Use case 1: Verify connectivity status changes
💬 Description: Ensure that the ConnectivityProvider correctly emits ConnectivityStatus.connected when the device has internet connectivity and ConnectivityStatus.disconnected when the device loses internet connectivity.
📷 Screenshots or GIFs (if applicable):
**Checklist:**
---
- [x] **Coding Standards:** I have reviewed my code to ensure it follows the project's coding standards.
- [x] **Testing:** I have tested the changes and they work as expected.
- [x] **Merge Conflicts:** I have resolved any merge conflicts with the latest main/development branch.
- [x] **Branch Status:** The branch is up-to-date with the target branch (main/development).
📝 Summary
This PR adapts the connectivity service of the app to use the
internet_connection_checker_plus
package, which provides more robust connectivity checking by not only checking for network connectivity, but also pinging the internet to ensure the app can actually access external resources.Description
This PR addresses the issue of the app's current connectivity service, which only checks for network connectivity without verifying the app's ability to access the internet. The changes made in this PR replace the existing
ConnectivityService
with a new implementation that uses theinternet_connection_checker_plus
package.The new
ConnectivityProvider
now listens to the stream of connectivity status from theinternet_connection_checker_plus
package and transforms it into a stream ofConnectivityStatus
values, which can be consumed by the rest of the app.This approach provides a more reliable way to determine the app's connectivity status, as it not only checks for network availability but also verifies the app's ability to access external resources by pinging the internet.
Tests
🧪 Use case 1: Verify connectivity status changes
💬 Description: Ensure that the
ConnectivityProvider
correctly emitsConnectivityStatus.connected
when the device has internet connectivity andConnectivityStatus.disconnected
when the device loses internet connectivity.📷 Screenshots or GIFs (if applicable):