isConnected property

bool isConnected

Is connected returns true if the database is in state OPEN and at least the primary connection is connected

Connections can disconect because of network or database server problems.

Implementation

bool get isConnected =>
    state == State.open && (_masterConnection?.connected ?? false);