typedef OnErrorCallback = void Function(String? error)?;