engineLoadStatus method
void
engineLoadStatus(
- dynamic loadCallback(
- bool
)?
)
Implementation
void engineLoadStatus(Function(bool)? loadCallback) async {
_channel.invokeMethod("isLoad").then((status) {
if (status == 5) {
loadCallback?.call(true);
} else if (status == 10) {
loadCallback?.call(false);
} else if (status == -1) {
_channel.setMethodCallHandler((call) async {
if (call.method == "onLoad") {
int status = call.arguments;
if (status == 5) {
loadCallback?.call(true);
} else if (status == 10) {
loadCallback?.call(false);
}
}
return;
});
}
});
}