Tweaks to search page

This commit is contained in:
Shawn 2022-10-27 10:24:39 -06:00
parent b5157d14ce
commit fbf7e055b7
3 changed files with 16 additions and 20 deletions

View File

@ -81,12 +81,14 @@ class _InfoRow extends StatelessWidget {
padding: EdgeInsets.only(bottom: $styles.insets.sm), padding: EdgeInsets.only(bottom: $styles.insets.sm),
child: Row(children: [ child: Row(children: [
Expanded( Expanded(
flex: 40,
child: Text( child: Text(
label.toUpperCase(), label.toUpperCase(),
style: $styles.text.titleFont.copyWith(color: $styles.colors.accent2), style: $styles.text.titleFont.copyWith(color: $styles.colors.accent2),
), ),
), ),
Expanded( Expanded(
flex: 60,
child: Text( child: Text(
value.isEmpty ? '--' : value, value.isEmpty ? '--' : value,
style: $styles.text.body.copyWith(color: $styles.colors.offWhite), style: $styles.text.body.copyWith(color: $styles.colors.offWhite),

View File

@ -74,16 +74,13 @@ class _ExpandingTimeRangeSelectorState extends State<ExpandingTimeRangeSelector>
openBuilder: (_) => SizedBox( openBuilder: (_) => SizedBox(
width: constraints.maxWidth - pad * 2, width: constraints.maxWidth - pad * 2,
child: Center( child: Center(
child: SizedBox( child: _OpenedTimeRange(
width: $styles.sizes.maxContentWidth, startYear: widget.startYear,
child: _OpenedTimeRange( endYear: widget.endYear,
startYear: widget.startYear, onChange: widget.onChanged,
endYear: widget.endYear, wonder: widget.wonder,
onChange: widget.onChanged, painter: _painter,
wonder: widget.wonder, onClose: widget.panelController.toggle,
painter: _painter,
onClose: widget.panelController.toggle,
),
), ),
), ),
), ),

View File

@ -10,16 +10,13 @@ class _SearchInput extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return LayoutBuilder( return LayoutBuilder(
builder: (ctx, constraints) => Center( builder: (ctx, constraints) => Center(
child: SizedBox( child: Autocomplete<String>(
width: $styles.sizes.maxContentWidth, displayStringForOption: (data) => data,
child: Autocomplete<String>( onSelected: onSubmit,
displayStringForOption: (data) => data, optionsBuilder: _getSuggestions,
onSelected: onSubmit, optionsViewBuilder: (context, onSelected, results) =>
optionsBuilder: _getSuggestions, _buildSuggestionsView(context, onSelected, results, constraints),
optionsViewBuilder: (context, onSelected, results) => fieldViewBuilder: _buildInput,
_buildSuggestionsView(context, onSelected, results, constraints),
fieldViewBuilder: _buildInput,
),
), ),
), ),
); );