forceCheck method
Force an immediate probe outside the normal schedule.
Result is emitted to stateStream and returned directly. Safe to call at any time (e.g., after a failed API call).
Implementation
Future<ConnectivityState> forceCheck() {
_monitorService.triggerProbe();
return stateStream
.where((s) => s is! ConnectivityChecking)
.first
.timeout(
const Duration(seconds: 8),
onTimeout: () => currentState,
);
}