checkRuntimeLastError function
Implementation
bool checkRuntimeLastError(Completer completer) {
if (chrome.runtime.lastError case var error?) {
completer.completeError(Exception('RuntimeLastError: ${error.message}'));
return false;
}
return true;
}