isClosed property

bool isClosed

Reports on the latest known status of the connection: whether it was open or failed for some reason.

This is true when this instance is first created and after it has been closed or encountered an unrecoverable error. If a connection has already been opened and this value is now true, the connection cannot be reopened and a instance must be created.

Implementation

bool get isClosed => _connectionState is _PostgreSQLConnectionStateClosed;