feat: double tab edit side panel (#5000)

* feat: double tab edit side panel

* fix: double tap edit only for selected view, check added

* fix: format
This commit is contained in:
Vivek Verma 2024-04-11 12:17:02 +05:30 committed by GitHub
parent f93429de8b
commit b51ff318a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -409,6 +409,19 @@ class _SingleInnerViewItemState extends State<SingleInnerViewItem> {
behavior: HitTestBehavior.translucent,
onTap: () => widget.onSelected(widget.view),
onTertiaryTapDown: (_) => widget.onTertiarySelected?.call(widget.view),
onDoubleTap: isSelected
? () {
NavigatorTextFieldDialog(
title: LocaleKeys.disclosureAction_rename.tr(),
autoSelectAllText: true,
value: widget.view.name,
maxLength: 256,
onConfirm: (newValue, _) {
context.read<ViewBloc>().add(ViewEvent.rename(newValue));
},
).show(context);
}
: null,
child: SizedBox(
height: widget.height,
child: Padding(