isOk method

bool isOk()

Checks if the snapshot has completed successfully (with or without a value). Returns true if the snapshot is done and has no error.

Implementation

bool isOk() =>
    (connectionState == ConnectionState.done ||
        connectionState == ConnectionState.active) &&
    !hasError;