onMigrationError property
A callback to handle failures during schema migration.
If a migration fails, this handler is invoked. If null, the error is rethrown, which will likely crash the application, preventing it from running with a corrupted database. You can provide a handler to implement a custom recovery strategy, like clearing all local data.
Implementation
final MigrationErrorHandler? onMigrationError;