Перейти к основному содержимому

GestureDetector

Название типаПоддерживает анимации свойствКонтроллируемый по умолчаниюМожет содержать связанное действиеСсылка
GestureDetector✗✔️✗link
Атрибуты (устаревшие модели)
class GestureDetectorAttributes
implements DuitAttributes<GestureDetectorAttributes> {
ServerAction? onTap,
onTapDown,
onTapUp,
onTapCancel,
onDoubleTap,
onDoubleTapDown,
onDoubleTapCancel,
onLongPressDown,
onLongPressCancel,
onLongPress,
onLongPressStart,
onLongPressMoveUpdate,
onLongPressUp,
onLongPressEnd,
onPanStart,
onPanDown,
onPanUpdate,
onPanEnd,
onPanCancel;
bool? excludeFromSemantics;
DragStartBehavior dragStartBehavior;
HitTestBehavior? behavior;

GestureDetectorAttributes({
this.onTap,
this.onTapDown,
this.onTapUp,
this.onTapCancel,
this.onDoubleTap,
this.onDoubleTapDown,
this.onDoubleTapCancel,
this.onLongPressDown,
this.onLongPressCancel,
this.onLongPress,
this.onLongPressStart,
this.onLongPressMoveUpdate,
this.onLongPressUp,
this.onLongPressEnd,
this.onPanStart,
this.onPanDown,
this.onPanUpdate,
this.onPanEnd,
this.onPanCancel,
this.excludeFromSemantics,
this.dragStartBehavior = DragStartBehavior.start,
this.behavior,
});

Пример использования​

GestureDetector(
&duit_attributes.GestureDetectorAttributes[duit_core.RemoteAction]{
OnTap: &duit_core.RemoteAction{
Event: "/some_endpoint",
DependsOn: []*duit_core.ActionDependency{
{
Id: "widget_id",
Target: "object_key",
},
},
},
},
"id",
nil, //child
)