conn_pool 2.1.5

  • Example
  • Installing
  • Versions
  • new64


Manages a pool of connections.

Shared pool

Creating a pool

Pool requires an instance of ConnectionManager to open and close connections. In this article, we will use PostgresManager for demonstration purposes.

final pool = SharedPool(PostgresManager('exampleDB'), minSize: 5, maxSize: 10);

Getting connection

Connection<PostgreSQLConnection> conn = await pool.get();
PostgreSQLConnection db = conn.connection;
await db.execute(
        "CREATE TABLE posts (id SERIAL PRIMARY KEY, name VARCHAR(255), age INT);");

Releasing the connection to the pool

await conn.release();

Change log


  • Minor improvements to SharedPool release


  • Documentation


  • Updated README


  • SharedPool


import 'package:conn_pool/conn_pool.dart';

main() {}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  conn_pool: "^2.1.5"

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

      import 'package:conn_pool/conn_pool.dart';
Version Uploaded Documentation Archive
2.1.5 Jul 8, 2018 Go to the documentation of conn_pool 2.1.5 Download conn_pool 2.1.5 archive
2.1.4 Jul 7, 2018 Go to the documentation of conn_pool 2.1.4 Download conn_pool 2.1.4 archive
2.1.1 Jul 7, 2018 Go to the documentation of conn_pool 2.1.1 Download conn_pool 2.1.1 archive


We analyzed this package on Jul 13, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3


Describes how popular the package is relative to other packages. [more]
28 / 100
Code health derived from static analysis. [more]
100 / 100
Reflects how tidy and up-to-date the package is. [more]
100 / 100
Overall score:
Weighted score of the above. [more]
Learn more about scoring.


Detected platforms: Flutter, web, other

No platform restriction found in primary library package:conn_pool/conn_pool.dart.


  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.55.0 <2.0.0
Dev dependencies
test ^1.2.0