|
@@ -4,8 +4,6 @@ import 'package:app_flowy/plugins/grid/presentation/widgets/cell/select_option_c
|
|
|
import 'package:flutter/material.dart';
|
|
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
|
|
|
|
|
-import 'define.dart';
|
|
|
-
|
|
|
class BoardSelectOptionCell extends StatefulWidget {
|
|
|
final String groupId;
|
|
|
final GridCellControllerBuilder cellControllerBuilder;
|
|
@@ -37,6 +35,8 @@ class _BoardSelectOptionCellState extends State<BoardSelectOptionCell> {
|
|
|
return BlocProvider.value(
|
|
|
value: _cellBloc,
|
|
|
child: BlocBuilder<BoardSelectOptionCellBloc, BoardSelectOptionCellState>(
|
|
|
+ buildWhen: (previous, current) =>
|
|
|
+ previous.selectedOptions != current.selectedOptions,
|
|
|
builder: (context, state) {
|
|
|
if (state.selectedOptions
|
|
|
.where((element) => element.id == widget.groupId)
|
|
@@ -51,13 +51,10 @@ class _BoardSelectOptionCellState extends State<BoardSelectOptionCell> {
|
|
|
),
|
|
|
)
|
|
|
.toList();
|
|
|
- return Padding(
|
|
|
- padding: EdgeInsets.only(top: BoardSizes.cardCellVPadding),
|
|
|
- child: Align(
|
|
|
- alignment: Alignment.centerLeft,
|
|
|
- child: AbsorbPointer(
|
|
|
- child: Wrap(children: children, spacing: 4, runSpacing: 2),
|
|
|
- ),
|
|
|
+ return Align(
|
|
|
+ alignment: Alignment.centerLeft,
|
|
|
+ child: AbsorbPointer(
|
|
|
+ child: Wrap(children: children, spacing: 4, runSpacing: 2),
|
|
|
),
|
|
|
);
|
|
|
}
|