diff --git a/lib/providers/search.dart b/lib/providers/search.dart index 8c11d5e..36bc2ac 100644 --- a/lib/providers/search.dart +++ b/lib/providers/search.dart @@ -13,9 +13,7 @@ class SearchProvider extends ChangeNotifier { bool getNoStopsFoundValue() => _noStopsFound; getNearestBusStopSearchResults() async { - // bool canGetPermission = await LocationPermissionsProvider().getBoolPermissionStatus; - // TODO: fix - bool canGetPermission = false; + bool canGetPermission = await LocationPermsProvider.getPermStatus(); if (canGetPermission) { _searchResults = await BusService.getNearestStops(); notifyListeners(); diff --git a/lib/routes/search.dart b/lib/routes/search.dart index a16b256..e713a0c 100644 --- a/lib/routes/search.dart +++ b/lib/routes/search.dart @@ -31,13 +31,6 @@ class SearchPage extends StatelessWidget { Spacing(height: Values.marginBelowTitle).sliver(), SearchResultsList().sliverToBoxAdapter() - // SliverList( - // delegate: SliverChildListDelegate( - // [ - // SearchResultsList(), - // ], - // ), - // ) ], ).scaffold(); } diff --git a/lib/services/location.dart b/lib/services/location.dart index 9910f2e..45e2652 100644 --- a/lib/services/location.dart +++ b/lib/services/location.dart @@ -1,3 +1,5 @@ +import 'package:bot_toast/bot_toast.dart'; +import 'package:flutter/material.dart'; import 'package:geolocator/geolocator.dart'; import 'package:nextbussg/providers/location_perms.dart'; @@ -10,6 +12,7 @@ class LocationServices { } catch (e) { // request location await LocationPermsProvider.requestPerm(); + BotToast.showText(text: "Please go to settings to enable location access.", contentColor: Colors.red); return LocationServices.getLocation(); } }