[Polish] Define an injectable connectivity stream
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 84/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- PLpgSQL
- Star
- 0
- Fork
- 0
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của DevDogsUGA/DogPack
-
polish
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
DevDogsUGA/DogPack#131 ·
-
polish
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
DevDogsUGA/DogPack#130 ·
-
moderation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
DevDogsUGA/DogPack#119 ·
-
moderation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
DevDogsUGA/DogPack#113 ·
-
discover
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
DevDogsUGA/DogPack#106 ·
Tất cả issue của DevDogsUGA/DogPack
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
nightscout/nightguard#368 ·
-
Improve Sort Pop-Up list...Đang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
react-native-maps/react-native-maps#6031 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
bisq-network/bisq-mobile#1948 ·
Maintainer thường phản hồi trong vòng 1 ngày