ci: fix warnings

This commit is contained in:
appflowy 2022-08-29 10:06:29 +08:00
parent 60cf97969c
commit 61fb13eba6
6 changed files with 7 additions and 8 deletions

View File

@ -230,7 +230,7 @@ class BoardBloc extends Bloc<BoardEvent, BoardState> {
@freezed @freezed
class BoardEvent with _$BoardEvent { class BoardEvent with _$BoardEvent {
const factory BoardEvent.initial() = InitialBrid; const factory BoardEvent.initial() = _InitialBoard;
const factory BoardEvent.createRow(String groupId) = _CreateRow; const factory BoardEvent.createRow(String groupId) = _CreateRow;
const factory BoardEvent.didCreateRow(String groupId, RowPB row) = const factory BoardEvent.didCreateRow(String groupId, RowPB row) =
_DidCreateRow; _DidCreateRow;

View File

@ -1,7 +1,6 @@
import 'package:flowy_sdk/log.dart'; import 'package:flowy_sdk/log.dart';
import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart'; import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
import 'package:flowy_sdk/protobuf/flowy-grid/protobuf.dart'; import 'package:flowy_sdk/protobuf/flowy-grid/protobuf.dart';
import 'package:protobuf/protobuf.dart';
import 'group_listener.dart'; import 'group_listener.dart';
typedef OnGroupError = void Function(FlowyError); typedef OnGroupError = void Function(FlowyError);

View File

@ -329,7 +329,7 @@ class BoardColumnContext {
} }
class BoardColumnsState extends DraggingStateStorage class BoardColumnsState extends DraggingStateStorage
with ReorderDragTargerIndexKeyStorage { with ReorderDragTargetIndexKeyStorage {
/// Quick access to the [AFBoardColumnWidget] /// Quick access to the [AFBoardColumnWidget]
final Map<String, GlobalKey> columnKeys = {}; final Map<String, GlobalKey> columnKeys = {};
final Map<String, DraggingState> columnDragStates = {}; final Map<String, DraggingState> columnDragStates = {};

View File

@ -90,7 +90,7 @@ class AFBoardColumnWidget extends StatefulWidget {
final DraggingStateStorage? dragStateStorage; final DraggingStateStorage? dragStateStorage;
final ReorderDragTargerIndexKeyStorage? dragTargetIndexKeyStorage; final ReorderDragTargetIndexKeyStorage? dragTargetIndexKeyStorage;
final GlobalKey globalKey; final GlobalKey globalKey;

View File

@ -186,7 +186,7 @@ class DraggingState {
nextIndex = index; nextIndex = index;
} }
void setStartDragggingIndex(int index) { void setStartDraggingIndex(int index) {
Log.debug('$reorderFlexId setDragIndex: $index'); Log.debug('$reorderFlexId setDragIndex: $index');
dragStartIndex = index; dragStartIndex = index;
phantomIndex = index; phantomIndex = index;

View File

@ -31,7 +31,7 @@ abstract class ReoderFlexItem {
String get id; String get id;
} }
abstract class ReorderDragTargerIndexKeyStorage { abstract class ReorderDragTargetIndexKeyStorage {
void addKey(String reorderFlexId, String key, GlobalObjectKey value); void addKey(String reorderFlexId, String key, GlobalObjectKey value);
GlobalObjectKey? readKey(String reorderFlexId, String key); GlobalObjectKey? readKey(String reorderFlexId, String key);
} }
@ -80,7 +80,7 @@ class ReorderFlex extends StatefulWidget {
final DraggingStateStorage? dragStateStorage; final DraggingStateStorage? dragStateStorage;
final ReorderDragTargerIndexKeyStorage? dragTargetIndexKeyStorage; final ReorderDragTargetIndexKeyStorage? dragTargetIndexKeyStorage;
ReorderFlex({ ReorderFlex({
Key? key, Key? key,
@ -468,7 +468,7 @@ class ReorderFlexState extends State<ReorderFlex>
} }
void resetDragTargetIndex(int dragTargetIndex) { void resetDragTargetIndex(int dragTargetIndex) {
dragState.setStartDragggingIndex(dragTargetIndex); dragState.setStartDraggingIndex(dragTargetIndex);
widget.dragStateStorage?.write( widget.dragStateStorage?.write(
widget.reorderFlexId, widget.reorderFlexId,
dragState, dragState,