blob: 2ea189613240fd330264c0b21861767c00e9b5f3 [file] [log] [blame] [edit]
>>>
main() {
{
return TextFieldTapRegion(
onLongPressMoveUpdate: (longPressMoveUpdateDetails) {
(switch (Theme.of(this.context).platform) {
TargetPlatform.iOS || TargetPlatform.macOS =>
_renderEditable.selectPositionAt(
from: longPressMoveUpdateDetails.globalPosition,
cause: SelectionChangedCause.longPress,
),
TargetPlatform.android ||
TargetPlatform.fuchsia ||
TargetPlatform.linux ||
TargetPlatform.windows =>
_renderEditable.selectWordsInRange(
from: longPressMoveUpdateDetails.globalPosition -
longPressMoveUpdateDetails.offsetFromOrigin,
to: longPressMoveUpdateDetails.globalPosition,
cause: SelectionChangedCause.longPress,
)
});
},
);
}
}
<<<
main() {
{
return TextFieldTapRegion(
onLongPressMoveUpdate: (longPressMoveUpdateDetails) {
(switch (Theme.of(this.context).platform) {
TargetPlatform.iOS || TargetPlatform.macOS => _renderEditable
.selectPositionAt(
from: longPressMoveUpdateDetails.globalPosition,
cause: SelectionChangedCause.longPress,
),
TargetPlatform.android ||
TargetPlatform.fuchsia ||
TargetPlatform.linux ||
TargetPlatform.windows =>
_renderEditable.selectWordsInRange(
from: longPressMoveUpdateDetails.globalPosition -
longPressMoveUpdateDetails.offsetFromOrigin,
to: longPressMoveUpdateDetails.globalPosition,
cause: SelectionChangedCause.longPress,
),
});
},
);
}
}
>>>
main() {
{
return TextFieldTapRegion(
onLongPressMoveUpdate: (longPressMoveUpdateDetails) =>
switch (Theme.of(this.context).platform) {
TargetPlatform.iOS || TargetPlatform.macOS =>
_renderEditable.selectPositionAt(
from: longPressMoveUpdateDetails.globalPosition,
cause: SelectionChangedCause.longPress,
),
TargetPlatform.android ||
TargetPlatform.fuchsia ||
TargetPlatform.linux ||
TargetPlatform.windows =>
_renderEditable.selectWordsInRange(
from: longPressMoveUpdateDetails.globalPosition -
longPressMoveUpdateDetails.offsetFromOrigin,
to: longPressMoveUpdateDetails.globalPosition,
cause: SelectionChangedCause.longPress,
)
},
);
}
}
<<<
main() {
{
return TextFieldTapRegion(
onLongPressMoveUpdate: (longPressMoveUpdateDetails) =>
switch (Theme.of(this.context).platform) {
TargetPlatform.iOS || TargetPlatform.macOS => _renderEditable
.selectPositionAt(
from: longPressMoveUpdateDetails.globalPosition,
cause: SelectionChangedCause.longPress,
),
TargetPlatform.android ||
TargetPlatform.fuchsia ||
TargetPlatform.linux ||
TargetPlatform.windows =>
_renderEditable.selectWordsInRange(
from: longPressMoveUpdateDetails.globalPosition -
longPressMoveUpdateDetails.offsetFromOrigin,
to: longPressMoveUpdateDetails.globalPosition,
cause: SelectionChangedCause.longPress,
),
},
);
}
}