|
@@ -2,6 +2,7 @@ import 'package:app_flowy/plugins/grid/application/field/type_option/select_opti
|
|
import 'package:appflowy_popover/popover.dart';
|
|
import 'package:appflowy_popover/popover.dart';
|
|
import 'package:flowy_infra/image.dart';
|
|
import 'package:flowy_infra/image.dart';
|
|
import 'package:flowy_infra/theme.dart';
|
|
import 'package:flowy_infra/theme.dart';
|
|
|
|
+import 'package:flowy_infra_ui/flowy_infra_ui.dart';
|
|
import 'package:flowy_infra_ui/flowy_infra_ui_web.dart';
|
|
import 'package:flowy_infra_ui/flowy_infra_ui_web.dart';
|
|
import 'package:flowy_infra_ui/style_widget/button.dart';
|
|
import 'package:flowy_infra_ui/style_widget/button.dart';
|
|
import 'package:flowy_infra_ui/style_widget/text.dart';
|
|
import 'package:flowy_infra_ui/style_widget/text.dart';
|
|
@@ -180,10 +181,11 @@ class _OptionCellState extends State<_OptionCell> {
|
|
Widget build(BuildContext context) {
|
|
Widget build(BuildContext context) {
|
|
final theme = context.watch<AppTheme>();
|
|
final theme = context.watch<AppTheme>();
|
|
|
|
|
|
- return Popover(
|
|
|
|
|
|
+ return AppFlowyStylePopover(
|
|
controller: _popoverController,
|
|
controller: _popoverController,
|
|
mutex: widget.popoverMutex,
|
|
mutex: widget.popoverMutex,
|
|
offset: const Offset(20, 0),
|
|
offset: const Offset(20, 0),
|
|
|
|
+ constraints: BoxConstraints.loose(const Size(460, 440)),
|
|
child: SizedBox(
|
|
child: SizedBox(
|
|
height: GridSize.typeOptionItemHeight,
|
|
height: GridSize.typeOptionItemHeight,
|
|
child: SelectOptionTagCell(
|
|
child: SelectOptionTagCell(
|
|
@@ -200,24 +202,21 @@ class _OptionCellState extends State<_OptionCell> {
|
|
),
|
|
),
|
|
),
|
|
),
|
|
popupBuilder: (BuildContext popoverContext) {
|
|
popupBuilder: (BuildContext popoverContext) {
|
|
- return OverlayContainer(
|
|
|
|
- constraints: BoxConstraints.loose(const Size(460, 440)),
|
|
|
|
- child: SelectOptionTypeOptionEditor(
|
|
|
|
- option: widget.option,
|
|
|
|
- onDeleted: () {
|
|
|
|
- context
|
|
|
|
- .read<SelectOptionTypeOptionBloc>()
|
|
|
|
- .add(SelectOptionTypeOptionEvent.deleteOption(widget.option));
|
|
|
|
- PopoverContainer.of(popoverContext).closeAll();
|
|
|
|
- },
|
|
|
|
- onUpdated: (updatedOption) {
|
|
|
|
- context
|
|
|
|
- .read<SelectOptionTypeOptionBloc>()
|
|
|
|
- .add(SelectOptionTypeOptionEvent.updateOption(updatedOption));
|
|
|
|
- PopoverContainer.of(popoverContext).closeAll();
|
|
|
|
- },
|
|
|
|
- key: ValueKey(widget.option.id),
|
|
|
|
- ),
|
|
|
|
|
|
+ return SelectOptionTypeOptionEditor(
|
|
|
|
+ option: widget.option,
|
|
|
|
+ onDeleted: () {
|
|
|
|
+ context
|
|
|
|
+ .read<SelectOptionTypeOptionBloc>()
|
|
|
|
+ .add(SelectOptionTypeOptionEvent.deleteOption(widget.option));
|
|
|
|
+ PopoverContainer.of(popoverContext).closeAll();
|
|
|
|
+ },
|
|
|
|
+ onUpdated: (updatedOption) {
|
|
|
|
+ context
|
|
|
|
+ .read<SelectOptionTypeOptionBloc>()
|
|
|
|
+ .add(SelectOptionTypeOptionEvent.updateOption(updatedOption));
|
|
|
|
+ PopoverContainer.of(popoverContext).closeAll();
|
|
|
|
+ },
|
|
|
|
+ key: ValueKey(widget.option.id),
|
|
);
|
|
);
|
|
},
|
|
},
|
|
);
|
|
);
|