Skip to content

Commit

Permalink
fix: fix padding for fab by adding bottom system ui padding
Browse files Browse the repository at this point in the history
  • Loading branch information
maelchiotti committed Apr 3, 2024
1 parent 4ccfb29 commit d76985d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/utils/constants/paddings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ enum Paddings {
padding64(64),
;

double get bottomSystemUiPadding => MediaQuery.of(navigatorKey.currentContext!).padding.bottom;

EdgeInsets get zero => EdgeInsets.zero;

EdgeInsets get all => EdgeInsets.all(_padding);
Expand All @@ -27,9 +29,9 @@ enum Paddings {

EdgeInsets get bottom => EdgeInsets.only(bottom: _padding);

EdgeInsets get bottomSystemUi => EdgeInsets.only(bottom: MediaQuery.of(navigatorKey.currentContext!).padding.bottom);
EdgeInsets get bottomSystemUi => EdgeInsets.only(bottom: bottomSystemUiPadding);

EdgeInsets get fab => const EdgeInsets.only(bottom: kFloatingActionButtonMargin + 64);
EdgeInsets get fab => EdgeInsets.only(bottom: bottomSystemUiPadding + kFloatingActionButtonMargin + 64);

EdgeInsets get page => const EdgeInsets.all(16);

Expand Down

0 comments on commit d76985d

Please sign in to comment.