Simplify observed values about text selection in composer
hasTextSelection had no interest. The other two values have been put inside an object to observe only one object.
This commit is contained in:
@@ -963,9 +963,11 @@ class ComposerView extends GetWidget<ComposerController> {
|
||||
}
|
||||
|
||||
return Obx(() {
|
||||
if (controller.hasTextSelection.value &&
|
||||
controller.textSelectionCoordinates.value != null) {
|
||||
final coordinates = controller.textSelectionCoordinates.value!;
|
||||
final textSelection = controller.editorTextSelection.value;
|
||||
if (textSelection != null &&
|
||||
textSelection.hasSelection &&
|
||||
textSelection.coordinates != null) {
|
||||
final coordinates = textSelection.coordinates!;
|
||||
return PositionedDirectional(
|
||||
start: coordinates.dx,
|
||||
top: coordinates.dy,
|
||||
|
||||
Reference in New Issue
Block a user