Skip to content

Commit

Permalink
Fix a warning on iOS (#5950)
Browse files Browse the repository at this point in the history
Co-authored-by: Edouard Marquez <[email protected]>
  • Loading branch information
g123k and Edouard Marquez authored Nov 27, 2024
1 parent a0c4556 commit 4750ff0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/smooth_app/lib/widgets/smooth_navigation_bar.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'dart:io';
import 'dart:math' as math;

import 'package:collection/collection.dart';
import 'package:flutter/material.dart';
Expand Down Expand Up @@ -41,8 +42,11 @@ class _SmoothNavigationBarState extends State<SmoothNavigationBar> {
: Theme.of(context).scaffoldBackgroundColor,
child: Padding(
padding: EdgeInsetsDirectional.only(
bottom: MediaQuery.of(context).padding.bottom -
(Platform.isIOS ? 5.0 : 0.0),
bottom: math.max(
0,
MediaQuery.viewPaddingOf(context).bottom -
(Platform.isIOS ? 5.0 : 0.0),
),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
Expand Down

0 comments on commit 4750ff0

Please sign in to comment.