-
Notifications
You must be signed in to change notification settings - Fork 250
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…
- Loading branch information
1 parent
49ba1fb
commit bb118cf
Showing
6 changed files
with
306 additions
and
39 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
Oops, something went wrong.