Requirement: Text selection using SelectionArea widget when there are multiple textspans and widgetspans.
I know that text selection works well with textspans. But in my case I have widgetspan along with text spans due to which selection is not working properly.
I have a builder method that returns an InlineSpan so I can only use textspan and widgetspan.
SelectionArea(
child: Text.rich(
TextSpan(
children:[
WidgetSpan(
child: Container(
padding EdgeInsets.all(8.0),
child: SizedBox(),
)),
TextSpan(text: 'Hello world'),
WidgetSpan(
child: Container(
padding EdgeInsets.all(8.0),
child: SizedBox(),
)),
]
)));