i don't think position offset will remain same , as we will Scroll it will change its y coordinate (if vertical) => I/flutter ( 9989): [Tuple4<Widget>: Widget: TextFormField, Size: Size(258.0, 24.0), Position: Offset(51.0, -865.7),WidgetType: WidgetType.input, Tuple4<Widget>: Widget: TextFormField, Size: Size(258.0, 24.0), Position: Offset(51.0, -790.7),WidgetType: WidgetType.input, Tuple4<Widget>: Widget: TextFormField, Size: Size(258.0, 24.0), Position: Offset(51.0, 412.5),WidgetType: WidgetType.input]
i think this can help you =>
List<T> findWidgets<T extends Widget>() => collectAllElementsFrom(
Widgets Binding.instance.renderViewElement, skipOffstage: false)
.map((e) => e.widget) .whereType<T>()
.tolist();
That looks like it could help.
i don't think position offset will remain same , as we will Scroll it will change its y coordinate (if vertical) => I/flutter ( 9989): [Tuple4<Widget>: Widget: TextFormField, Size: Size(258.0, 24.0), Position: Offset(51.0, -865.7),WidgetType: WidgetType.input, Tuple4<Widget>: Widget: TextFormField, Size: Size(258.0, 24.0), Position: Offset(51.0, -790.7),WidgetType: WidgetType.input, Tuple4<Widget>: Widget: TextFormField, Size: Size(258.0, 24.0), Position: Offset(51.0, 412.5),WidgetType: WidgetType.input]
2
I/flutter ( 9989): [Tuple4<Widget>: Widget: TextFormField, Size: Size(258.0, 24.0), Position: Offset(51.0, -865.5),WidgetType: WidgetType.input, Tuple4<Widget>: Widget: TextFormField, Size: Size(258.0, 24.0), Position: Offset(51.0, -790.5),WidgetType: WidgetType.input, Tuple4<Widget>: Widget: TextFormField, Size: Size(258.0, 24.0), Position: Offset(51.0, 412.5),WidgetType: WidgetType.input]
Please chheck this => https://github.com/mg3994/widget_watcher_bounty_solution/blob/main/new_idea/ReadMe.md
I can't comment on any of those things, but the bounty has been claimed.
I'll simply add override rules.
.i.e. TextField will be taken for a widget at the same place as an input and a scroll etc.
I just needed the scan and printing out of widgets, that's the base part and I can wrap up the rest of the functionality myself.