if i have a listview builder which is comprised of empty Container() and ListTile() in random order, how can i identify which widget appeared at particular index ?
Asked
Active
Viewed 210 times
0
-
This question may help you https://stackoverflow.com/questions/7715948/how-to-perform-runtime-type-checking-in-dart – Thomas Banderas Jul 02 '22 at 16:56
1 Answers
0
You can use print(widget.runtimeType);
to determine the type of a widget.

Kaushik Chandru
- 15,510
- 2
- 12
- 30