[Polish] Define an injectable connectivity stream
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 84/100
Research direction
Start with lib/screens/sign_in_screen.dart and inspect how the sign-in button and screen state are built; then review pubspec.yaml and the Flutter test setup. Add the monitor in lib/connectivity/connectivity_monitor.dart and cover its injected stream in test/offline_banner_test.dart. Done means offline shows the banner and disables Sign In, online removes both effects, and the Flutter checks pass.
Written by the indexing model from the issue text.
Description
What to build
Define the small connection-status interface that the app’s offline banner will use. Tests should be able to send online/offline changes without relying on the phone’s real network.
Files
lib/connectivity/connectivity_monitor.dart(new file)- Starting example: lib/app.dart
Code to add or extend:abstract interface class ConnectivityMonitor { Stream<bool> get online; Future<void> dispose(); }.
Steps
- Add
ConnectivityMonitorwith Stream online and Future dispose(). true means the device has a network connection; it does not guarantee the internet is reachable. - In tests, add
FakeConnectivityMonitorusing StreamController.broadcast(), an online getter and emit(bool). Close the controller in dispose. - Check that emit(false) then emit(true) delivers those values. This issue defines the connection source; the next one adds the real library.
Example
emit(false),emit(true) produces those two events; disposing closes the stream.
Check it works
In test/connectivity/connectivity_monitor_5_test.dart, check the example above and the failure or limit described in the steps. Run flutter test test/connectivity/connectivity_monitor_5_test.dart and flutter analyze.
References
Assign yourself before starting, or comment to claim the issue. Project setup.
- Dominant language
- PLpgSQL
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing 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 DevDogsUGA/DogPack
-
polish
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
DevDogsUGA/DogPack#131 ·
-
polish
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
DevDogsUGA/DogPack#130 ·
-
moderation
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
DevDogsUGA/DogPack#119 ·
-
moderation
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
DevDogsUGA/DogPack#113 ·
-
discover
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
DevDogsUGA/DogPack#106 ·
All issues in DevDogsUGA/DogPack
Similar issues
-
[BUG] Navigation drawer drops library-name suffixes without ellipsis (1.0.8, NVIDIA Shield)Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
damontecres/Wholphin#2069 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 80/100
rajput-hemant/calculator#199 ·
-
Android (vision-camera-location): HybridLocationManager never quits its HandlerThread on disposeOpen
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
margelo/react-native-vision-camera#4217 ·
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
saisaharsh3/Leftovers#13 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
leancodepl/app-rating#35 ·