IMGIITRoorkee / IMGIITRoorkee/placement-flutter

Distinguish an empty calendar from a failed calendar fetch

Open
#60 0 comments 0 reactions 0 assignees View on GitHub
bug P2
Dominant language
Dart
Stars
3
Forks
10
Avg merge
8d 21h
Merged PRs (30d)
4

Description

**Problem**

`fetchEvents` returns an empty list both when the request succeeds with no events and when it fails with the `-1` or `-2` sentinel. The calendar view has neither an error state nor an empty state.

A student with no connectivity sees an ordinary empty calendar and concludes there are no events.

**Where**

- `lib/services/generic/calendarService.dart:12-23`
- `lib/views/calendarView.dart:114-138`

**Expected**

A network failure shows the retry widget, as the other tabs already do. No events says so explicitly.

**Fix sketch**

- Return `List?` and render `ErrorWidgetWithRefreshCallback` on null.
- Add an explicit empty state.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in lib/services/generic/calendarService.dart:12-23 to trace how fetchEvents represents success and the -1/-2 failures, then inspect lib/views/calendarView.dart:114-138 and the retry handling used by other tabs. Done means network failures show ErrorWidgetWithRefreshCallback and successful responses with no events show an explicit empty state.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.