add profile page, privacy options
All checks were successful
Release / meta (push) Successful in 11s
Release / linux-build (push) Successful in 1m0s
Release / web-build (push) Successful in 2m29s
Release / android-build (push) Successful in 10m26s
Release / release-master (push) Successful in 37s
Release / release-dev (push) Successful in 49s
All checks were successful
Release / meta (push) Successful in 11s
Release / linux-build (push) Successful in 1m0s
Release / web-build (push) Successful in 2m29s
Release / android-build (push) Successful in 10m26s
Release / release-master (push) Successful in 37s
Release / release-dev (push) Successful in 49s
This commit is contained in:
@@ -17,6 +17,8 @@ class _LegsPageState extends State<LegsPage> {
|
||||
DateTime? _startDate;
|
||||
DateTime? _endDate;
|
||||
bool _initialised = false;
|
||||
bool _unallocatedOnly = false;
|
||||
bool _showMoreFilters = false;
|
||||
|
||||
@override
|
||||
void didChangeDependencies() {
|
||||
@@ -33,6 +35,7 @@ class _LegsPageState extends State<LegsPage> {
|
||||
sortDirection: _sortDirection,
|
||||
dateRangeStart: _formatDate(_startDate),
|
||||
dateRangeEnd: _formatDate(_endDate),
|
||||
unallocatedOnly: _unallocatedOnly,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -44,6 +47,7 @@ class _LegsPageState extends State<LegsPage> {
|
||||
dateRangeEnd: _formatDate(_endDate),
|
||||
offset: data.legs.length,
|
||||
append: true,
|
||||
unallocatedOnly: _unallocatedOnly,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -84,6 +88,8 @@ class _LegsPageState extends State<LegsPage> {
|
||||
_startDate = null;
|
||||
_endDate = null;
|
||||
_sortDirection = 0;
|
||||
_unallocatedOnly = false;
|
||||
_showMoreFilters = false;
|
||||
});
|
||||
_refreshLegs();
|
||||
}
|
||||
@@ -177,8 +183,46 @@ class _LegsPageState extends State<LegsPage> {
|
||||
: _formatDate(_endDate!)!,
|
||||
),
|
||||
),
|
||||
TextButton.icon(
|
||||
onPressed: () => setState(
|
||||
() => _showMoreFilters = !_showMoreFilters,
|
||||
),
|
||||
icon: Icon(
|
||||
_showMoreFilters
|
||||
? Icons.expand_less
|
||||
: Icons.expand_more,
|
||||
),
|
||||
label: Text(
|
||||
_showMoreFilters ? 'Hide filters' : 'More filters',
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
AnimatedCrossFade(
|
||||
crossFadeState: _showMoreFilters
|
||||
? CrossFadeState.showFirst
|
||||
: CrossFadeState.showSecond,
|
||||
duration: const Duration(milliseconds: 200),
|
||||
firstChild: Padding(
|
||||
padding: const EdgeInsets.only(top: 12.0),
|
||||
child: Wrap(
|
||||
spacing: 12,
|
||||
runSpacing: 12,
|
||||
children: [
|
||||
FilterChip(
|
||||
avatar: const Icon(Icons.flash_off),
|
||||
label: const Text('Unallocated only'),
|
||||
selected: _unallocatedOnly,
|
||||
onSelected: (selected) async {
|
||||
setState(() => _unallocatedOnly = selected);
|
||||
await _refreshLegs();
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
secondChild: const SizedBox.shrink(),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user