createDataSourceInterface<T> function

DataSourceInterface<T> createDataSourceInterface<T>({
  1. Future<T> loadValueAction()?,
  2. Future<void> onValueUpdatedAction(
    1. T value,
    2. bool hasChange
    )?,
})

Implementation

DataSourceInterface<T> createDataSourceInterface<T>({
  Future<T> Function()? loadValueAction,
  Future<void> Function(T value, bool hasChange)? onValueUpdatedAction,
}) {
  return _DataSourceInterface<T>(
    loadValueAction: loadValueAction,
    onValueUpdatedAction: onValueUpdatedAction,
  );
}