app bar layout padding review
This commit is contained in:
parent
bae6d2b7c4
commit
81a2b84c9f
4 changed files with 10 additions and 5 deletions
|
@ -9,8 +9,8 @@ import 'package:provider/provider.dart';
|
|||
class FilterBar extends StatefulWidget {
|
||||
static const EdgeInsets chipPadding = EdgeInsets.symmetric(horizontal: 4);
|
||||
static const EdgeInsets rowPadding = EdgeInsets.symmetric(horizontal: 4);
|
||||
static const double verticalPadding = 16;
|
||||
static const double preferredHeight = AvesFilterChip.minChipHeight + verticalPadding;
|
||||
static const EdgeInsets padding = EdgeInsets.only(top: 4, bottom: 8);
|
||||
static final double preferredHeight = AvesFilterChip.minChipHeight + padding.vertical;
|
||||
|
||||
final List<CollectionFilter> filters;
|
||||
final bool interactive;
|
||||
|
@ -84,6 +84,7 @@ class _FilterBarState extends State<FilterBar> {
|
|||
return Container(
|
||||
// specify transparent as a workaround to prevent
|
||||
// chip border clipping when the floating app bar is fading
|
||||
padding: FilterBar.padding,
|
||||
color: Colors.transparent,
|
||||
height: FilterBar.preferredHeight,
|
||||
child: AnimatedList(
|
||||
|
|
|
@ -8,6 +8,8 @@ class CrumbLine<T> extends StatefulWidget {
|
|||
final T Function(BuildContext context, int index) combine;
|
||||
final void Function(T combined) onTap;
|
||||
|
||||
static const EdgeInsets padding = EdgeInsets.only(top: 6, bottom: 20);
|
||||
|
||||
const CrumbLine({
|
||||
super.key,
|
||||
required this.split,
|
||||
|
@ -18,7 +20,7 @@ class CrumbLine<T> extends StatefulWidget {
|
|||
@override
|
||||
State<CrumbLine<T>> createState() => _CrumbLineState<T>();
|
||||
|
||||
static double getPreferredHeight(TextScaler textScaler) => textScaler.scale(kToolbarHeight);
|
||||
static double getPreferredHeight(TextScaler textScaler) => textScaler.scale(22) + padding.vertical;
|
||||
}
|
||||
|
||||
class _CrumbLineState<T> extends State<CrumbLine<T>> {
|
||||
|
|
|
@ -65,7 +65,8 @@ class _ExplorerAppBarState extends State<ExplorerAppBar> with WidgetsBindingObse
|
|||
actions: _buildActions,
|
||||
bottom: LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
return SizedBox(
|
||||
return Container(
|
||||
padding: CrumbLine.padding,
|
||||
width: constraints.maxWidth,
|
||||
height: CrumbLine.getPreferredHeight(MediaQuery.textScalerOf(context)),
|
||||
child: ValueListenableBuilder<VolumeRelativeDirectory?>(
|
||||
|
|
|
@ -170,7 +170,8 @@ class _FilterGridAppBarState<T extends CollectionFilter, CSAD extends ChipSetAct
|
|||
if (_showGroupCrumbLine(context))
|
||||
LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
return SizedBox(
|
||||
return Container(
|
||||
padding: CrumbLine.padding,
|
||||
width: constraints.maxWidth,
|
||||
height: CrumbLine.getPreferredHeight(MediaQuery.textScalerOf(context)),
|
||||
child: Selector<FilterGroupNotifier, Uri?>(
|
||||
|
|
Loading…
Reference in a new issue