mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: bump af board ver (#3825)
* chore: bump af board ver * fix: select card cell popover opening
This commit is contained in:
parent
18bd91936c
commit
7f4e7e6aa0
@ -1,10 +1,7 @@
|
|||||||
import 'package:appflowy/plugins/database_view/application/cell/cell_controller_builder.dart';
|
import 'package:appflowy/plugins/database_view/application/cell/cell_controller_builder.dart';
|
||||||
import 'package:appflowy/plugins/database_view/widgets/row/cells/select_option_cell/extension.dart';
|
import 'package:appflowy/plugins/database_view/widgets/row/cells/select_option_cell/extension.dart';
|
||||||
import 'package:appflowy/plugins/database_view/widgets/row/cells/select_option_cell/select_option_cell_bloc.dart';
|
import 'package:appflowy/plugins/database_view/widgets/row/cells/select_option_cell/select_option_cell_bloc.dart';
|
||||||
import 'package:appflowy/plugins/database_view/widgets/row/cells/select_option_cell/select_option_editor.dart';
|
|
||||||
import 'package:appflowy_backend/protobuf/flowy-database2/select_option.pb.dart';
|
import 'package:appflowy_backend/protobuf/flowy-database2/select_option.pb.dart';
|
||||||
import 'package:appflowy_popover/appflowy_popover.dart';
|
|
||||||
import 'package:flowy_infra_ui/flowy_infra_ui.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
|
||||||
@ -35,11 +32,9 @@ class SelectOptionCardCell<CustomCardData>
|
|||||||
|
|
||||||
class _SelectOptionCellState extends State<SelectOptionCardCell> {
|
class _SelectOptionCellState extends State<SelectOptionCardCell> {
|
||||||
late SelectOptionCellBloc _cellBloc;
|
late SelectOptionCellBloc _cellBloc;
|
||||||
late PopoverController _popover;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
_popover = PopoverController();
|
|
||||||
final cellController =
|
final cellController =
|
||||||
widget.cellControllerBuilder.build() as SelectOptionCellController;
|
widget.cellControllerBuilder.build() as SelectOptionCellController;
|
||||||
_cellBloc = SelectOptionCellBloc(cellController: cellController)
|
_cellBloc = SelectOptionCellBloc(cellController: cellController)
|
||||||
@ -65,16 +60,14 @@ class _SelectOptionCellState extends State<SelectOptionCardCell> {
|
|||||||
return custom;
|
return custom;
|
||||||
}
|
}
|
||||||
|
|
||||||
final children = state.selectedOptions.map(
|
final children = state.selectedOptions
|
||||||
(option) {
|
.map(
|
||||||
final tag = SelectOptionTag.fromOption(
|
(option) => SelectOptionTag.fromOption(
|
||||||
context: context,
|
context: context,
|
||||||
option: option,
|
option: option,
|
||||||
onSelected: () => _popover.show(),
|
),
|
||||||
);
|
)
|
||||||
return _wrapPopover(tag);
|
.toList();
|
||||||
},
|
|
||||||
).toList();
|
|
||||||
|
|
||||||
return IntrinsicHeight(
|
return IntrinsicHeight(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
@ -89,28 +82,6 @@ class _SelectOptionCellState extends State<SelectOptionCardCell> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _wrapPopover(Widget child) {
|
|
||||||
final constraints = BoxConstraints.loose(
|
|
||||||
Size(
|
|
||||||
SelectOptionCellEditor.editorPanelWidth,
|
|
||||||
300,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
return AppFlowyPopover(
|
|
||||||
controller: _popover,
|
|
||||||
constraints: constraints,
|
|
||||||
direction: PopoverDirection.bottomWithLeftAligned,
|
|
||||||
popupBuilder: (BuildContext context) {
|
|
||||||
return SelectOptionCellEditor(
|
|
||||||
cellController: widget.cellControllerBuilder.build()
|
|
||||||
as SelectOptionCellController,
|
|
||||||
);
|
|
||||||
},
|
|
||||||
onClose: () {},
|
|
||||||
child: child,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<void> dispose() async {
|
Future<void> dispose() async {
|
||||||
_cellBloc.close();
|
_cellBloc.close();
|
||||||
|
@ -45,11 +45,11 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
path: "."
|
path: "."
|
||||||
ref: a183c57
|
ref: "6aba8dd"
|
||||||
resolved-ref: a183c57013071cb3192fcf3c9b1eeb89462179b7
|
resolved-ref: "6aba8ddd86839ca09b997cb2457f013236e0c337"
|
||||||
url: "https://github.com/AppFlowy-IO/appflowy-board.git"
|
url: "https://github.com/AppFlowy-IO/appflowy-board.git"
|
||||||
source: git
|
source: git
|
||||||
version: "0.0.9"
|
version: "0.1.0"
|
||||||
appflowy_editor:
|
appflowy_editor:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -43,7 +43,7 @@ dependencies:
|
|||||||
# path: packages/appflowy_board
|
# path: packages/appflowy_board
|
||||||
git:
|
git:
|
||||||
url: https://github.com/AppFlowy-IO/appflowy-board.git
|
url: https://github.com/AppFlowy-IO/appflowy-board.git
|
||||||
ref: a183c57
|
ref: 6aba8dd
|
||||||
appflowy_editor: ^1.5.0
|
appflowy_editor: ^1.5.0
|
||||||
appflowy_popover:
|
appflowy_popover:
|
||||||
path: packages/appflowy_popover
|
path: packages/appflowy_popover
|
||||||
|
Loading…
x
Reference in New Issue
Block a user