1

I am using SelectionArea on top of a ListView with Texts.

Is there a way to access the selected text in the SelectionArea Class?

Looking for a callback method like onSelectionChanged from the SelectableText Class.

class HomePage extends StatelessWidget {
  const HomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: SelectionArea(
        child: ListView.separated(
          itemBuilder: (context, index) => Text(
            List.generate(index + 1, (index) => 'Lorem Ipsum').join(' '),
          ),
          separatorBuilder: (_, __) => const SizedBox(height: 20),
          itemCount: 50,
        ),
      ),
    );
  }
}

Mohammad Amir
  • 352
  • 2
  • 12

1 Answers1

2

Unfortunately, this issue is open on GitHub, there has to be a new feature to implement this functionality in the future. They labeled this issue as a valid feature request.

Nijat Namazzade
  • 652
  • 5
  • 15