forked from superlistapp/super_editor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add iOS tap in empty space to show toolbar, Android long-press in emp…
…ty space to show toolbar. (Resolves superlistapp#1472) (superlistapp#1476)
- Loading branch information
1 parent
ff36084
commit f282641
Showing
4 changed files
with
109 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
super_editor/lib/src/infrastructure/flutter/text_selection.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import 'package:flutter/painting.dart'; | ||
|
||
extension Bounds on TextSelection { | ||
/// Returns `true` if this [TextSelection] has the same bounds as the | ||
/// [other] [TextSelection], regardless of selection direction, i.e., | ||
/// affinity. | ||
bool hasSameBoundsAs(TextSelection other) { | ||
return start == other.start && end == other.end; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters