add cache for latitude and use in searchdelagate
This commit is contained in:
@@ -367,7 +367,11 @@ class _MyHomePageState extends State<ListItemMenu> {
|
||||
border: OutlineInputBorder(),
|
||||
suffixIcon: IconButton(
|
||||
icon: const Icon(Icons.clear),
|
||||
onPressed: () {
|
||||
onPressed: () async {
|
||||
SharedPreferences prefs =
|
||||
await SharedPreferences.getInstance();
|
||||
prefs.remove("city_lat");
|
||||
prefs.remove("city_long");
|
||||
setState(() {
|
||||
Datepicker.text = '';
|
||||
});
|
||||
@@ -464,7 +468,7 @@ class _MyHomePageState extends State<ListItemMenu> {
|
||||
onPressed: () {
|
||||
showSearch(
|
||||
context: context,
|
||||
delegate: SearchDelegateExample(geoQuery: inputGeo.text),
|
||||
delegate: SearchDelegateExample(),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
Reference in New Issue
Block a user