OnVersionChangedFunction typedef

FutureOr OnVersionChangedFunction (
  1. Database db,
  2. int oldVersion,
  3. int newVersion
)

Callback interface called when the existing version differs from the one expected.

Allow to perform migration or data change. Can return a future or not.

Implementation

typedef OnVersionChangedFunction = FutureOr Function(
    Database db, int oldVersion, int newVersion);