Skip to content

Commit

Permalink
fix(calendar): scroll to last past date with content when selected da…
Browse files Browse the repository at this point in the history
…te has no content
  • Loading branch information
JagandeepBrar committed Nov 27, 2022
1 parent 746bcc5 commit 3f10675
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,14 @@ class _State extends State<ScheduleView> {
Tuple2<List<Widget>, double> _buildSchedule() {
double offset = 0.0;
double offsetOfSelected = 0.0;

List<Widget> days = [];
List<DateTime> keys = widget.events.keys.toList();
keys.sort();

for (final key in keys) {
final selected = context.read<ModuleState>().selected;
if (selected.isAtSameMomentAs(key)) {
if (key.isBefore(selected) || key.isAtSameMomentAs(selected)) {
offsetOfSelected = offset;
}

Expand Down

0 comments on commit 3f10675

Please sign in to comment.