onConnectionStatusChange method
Implementation
onConnectionStatusChange(Function(String status) fn, [int timetout = 5]) {
recursive() async {
var status = 'ok';
try {
await request('/login/ready');
} catch (e) {
status = 'offline';
}
fn(status);
Future.delayed(Duration(seconds: timetout), recursive);
}
recursive();
}