2023-02-26 16:27:17 +08:00
|
|
|
import 'dart:collection';
|
|
|
|
|
2023-04-28 14:08:53 +08:00
|
|
|
import 'package:appflowy_backend/protobuf/flowy-database2/database_entities.pb.dart';
|
2023-02-26 16:27:17 +08:00
|
|
|
import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart';
|
|
|
|
|
|
|
|
import '../grid/presentation/widgets/filter/filter_info.dart';
|
|
|
|
import 'field/field_controller.dart';
|
|
|
|
import 'row/row_cache.dart';
|
2023-04-28 20:47:40 +08:00
|
|
|
import 'row/row_service.dart';
|
2023-02-26 16:27:17 +08:00
|
|
|
|
|
|
|
typedef OnFieldsChanged = void Function(UnmodifiableListView<FieldInfo>);
|
|
|
|
typedef OnFiltersChanged = void Function(List<FilterInfo>);
|
|
|
|
typedef OnDatabaseChanged = void Function(DatabasePB);
|
2023-03-20 21:16:37 +08:00
|
|
|
|
2023-04-28 20:47:40 +08:00
|
|
|
typedef OnRowsCreated = void Function(List<RowId> ids);
|
|
|
|
typedef OnRowsUpdated = void Function(List<RowId> ids);
|
|
|
|
typedef OnRowsDeleted = void Function(List<RowId> ids);
|
2023-06-01 20:23:27 +08:00
|
|
|
typedef OnNumOfRowsChanged = void Function(
|
2023-03-20 21:16:37 +08:00
|
|
|
UnmodifiableListView<RowInfo> rows,
|
2023-04-28 20:47:40 +08:00
|
|
|
UnmodifiableMapView<RowId, RowInfo> rowByRowId,
|
2023-03-20 21:16:37 +08:00
|
|
|
RowsChangedReason reason,
|
2023-02-26 16:27:17 +08:00
|
|
|
);
|
|
|
|
|
|
|
|
typedef OnError = void Function(FlowyError);
|