You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now using SelectionArea the selected text does not account for the height property and in turn the selected region has gaps:
The text was updated successfully, but these errors were encountered:
walsha2
changed the title
Set a default StrutStyle to match the default text style
Ensure that SelectionArea box height matches the text height
Dec 31, 2024
This is actually not possible in Flutter using SelectionArea just yet. There is no way to set selectionHeightStyle for a SelectionArea or in TextSelectionThemeData.
Ideal Result
The way to get this to work is using SelectableText directly because it exposes a selectionHeightStyle option:
SelectableText(
"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.",
selectionHeightStyle: ui.BoxHeightStyle.includeLineSpacingTop,
),
Right now using
SelectionArea
the selected text does not account for theheight
property and in turn the selected region has gaps:The text was updated successfully, but these errors were encountered: