@override Future<Duration> get idleThreshold async{ try{ final res=await methodChannel.invokeMethod<int>('getIdleThreshold'); return Duration(seconds: res??10); }catch(e){ return Duration(seconds: 10); } }