isDeviceReady method
future of deviceready event
Implementation
Future<bool> isDeviceReady() {
if (_isDeviceReady) {
return Future.value(true);
}
Completer<bool> completer = new Completer();
window.on['deviceready'].take(1).listen((Event event){
_isDeviceReady = true;
completer.complete();
});
return completer.future;
}