updateSelectionWithReason method
Future<void>
updateSelectionWithReason(
- Selection? selection, {
- SelectionUpdateReason reason = SelectionUpdateReason.transaction,
- Map? extraInfo,
Implementation
Future<void> updateSelectionWithReason(
Selection? selection, {
SelectionUpdateReason reason = SelectionUpdateReason.transaction,
Map? extraInfo,
}) async {
final completer = Completer<void>();
if (reason == SelectionUpdateReason.uiEvent) {
selectionType = SelectionType.inline;
WidgetsBinding.instance.addPostFrameCallback(
(timeStamp) => completer.complete(),
);
}
// broadcast to other users here
selectionExtraInfo = extraInfo;
_selectionUpdateReason = reason;
this.selection = selection;
return completer.future;
}