mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-07-19 02:27:29 +02:00
feat(ui): add bottom inset so scrollable content clears the transparent navbar
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
/// Bottom inset needed to clear the transparent shell navigation bar.
|
||||
///
|
||||
/// The shell Scaffold uses `extendBody: true`, so its body (and any route
|
||||
/// pushed inside the tab navigators) receives the navbar height plus the system
|
||||
/// gesture inset as `MediaQuery.padding.bottom`. Scrollable screens add this as
|
||||
/// trailing padding so their last item can scroll clear of the bar while the
|
||||
/// content still shows faintly behind it.
|
||||
extension NavBarInset on BuildContext {
|
||||
double get navBarBottomInset => MediaQuery.paddingOf(this).bottom;
|
||||
}
|
||||
Reference in New Issue
Block a user