start method
Start GeofenceService.
It can be initialized with geofenceList
.
Implementation
Future<void> start([List<Geofence>? geofenceList]) async {
if (_isRunningService) return Future.error(ErrorCodes.ALREADY_STARTED);
await _checkPermissions();
await _listenStream();
_activity = Activity.unknown;
if (geofenceList != null) _geofenceList.addAll(geofenceList);
_isRunningService = true;
_printDevLog('GeofenceService started.');
}