Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Matthias Ngeo <[email protected]>
  • Loading branch information
kawaijoe and Pante authored Dec 13, 2024
1 parent 5eb8b28 commit f96930a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions forui/lib/src/widgets/scaffold.dart
Original file line number Diff line number Diff line change
Expand Up @@ -229,14 +229,10 @@ class _RenderScaffold extends RenderBox

final footerConstraints = constraints.loosen();
final footer = lastChild!..layout(footerConstraints, parentUsesSize: true);
double footerHeight = footer.size.height;
if (_resizeToAvoidBottomInset) {
footerHeight = max(insets.bottom, footer.size.height);
}
final footerHeight = _resizeToAvoidBottomInset ? footerHeight = max(insets.bottom, footer.size.height) : footer.size.height;

final othersHeight = constraints.maxHeight - footerHeight;
final othersConstraints = constraints.copyWith(minHeight: 0, maxHeight: othersHeight);
others.layout(othersConstraints);
others.layout(constraints.copyWith(minHeight: 0, maxHeight: othersHeight));

others.data.offset = Offset.zero;
footer.data.offset = Offset(0, size.height - footer.size.height);
Expand Down

0 comments on commit f96930a

Please sign in to comment.