G
G
Gravio2020-11-26 15:33:38
Dart
Gravio, 2020-11-26 15:33:38

Swipe on flutter text?

ezgif-7-6a079ad1d0d2.gif

The task is to implement a similar swipe on text widgets.

I split the text into words and output them through map

List<String> words = ["test", "test2", "test3"];

Wrap(
  alignment: WrapAlignment.start,
  direction: Axis.horizontal,
  children: words.map((entry) => GestureDetector(
    onTap: () {
      print(entry);
    },
    child: Text(entry),
  )
);

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question