Skip to content

Commit

Permalink
Fixed bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Lasslos committed Oct 17, 2022
1 parent 2e24054 commit bd7223e
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions lib/ui/screens/home_screen/widgets/period_layout.dart
Original file line number Diff line number Diff line change
Expand Up @@ -292,16 +292,18 @@ class _PeriodLayoutDelegate extends MultiChildLayoutDelegate {
///In this case there is a determined period at the beginning of the list.
adjacentPeriods.clear();
adjacentPeriodsXAndWidth.clear();
adjacentPeriods.add([period]);
adjacentPeriodsXAndWidth.add(xAndWidth);
} else {
adjacentPeriods.add([period]);
var lastInPeriodsXAndWidth = adjacentPeriodsXAndWidth.last;
adjacentPeriodsXAndWidth
..last = MapEntry(
lastInPeriodsXAndWidth.key,
xAndWidth.key - lastInPeriodsXAndWidth.key,
)
..add(xAndWidth);
}
adjacentPeriods.add([period]);

var lastInPeriodsXAndWidth = adjacentPeriodsXAndWidth.last;
adjacentPeriodsXAndWidth
..last = MapEntry(
lastInPeriodsXAndWidth.key,
xAndWidth.key - lastInPeriodsXAndWidth.key,
)
..add(xAndWidth);

adjacentPeriods.add([]);
adjacentPeriodsXAndWidth.add(
Expand Down

0 comments on commit bd7223e

Please sign in to comment.