bool isPendingPromise(int idx) { String resultIsPending = evaluate("FLUTTER_NATIVEJS_IS_PENDING_PROMISE($idx)").stringResult; return "true" == resultIsPending; }