@ -29,7 +29,7 @@ class VisitsSearch {
this.expectedDateTo,
this.deviceNumber,
this.deviceName,
this.mostRecent,
this.mostRecent = true,
});
fromSearch(VisitsSearch newSearch) {
@ -58,6 +58,10 @@ class VisitsSearch {
_search["siteId"] = hospital.id;
}
if (mostRecent != null) {
_search["mostRecent"] = mostRecent;
if (brand != null && brand.isNotEmpty) {
// todo get new key
_search[""] = brand;
@ -107,7 +107,7 @@ class _RegularVisitsPageState extends State<RegularVisitsPage> with TickerProvid
),
Visibility(
visible: _visitsProvider.visitsSearch.toMap().isNotEmpty,
visible: (_visitsProvider.visitsSearch.toMap()..remove("mostRecent")).isNotEmpty,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: AButton(