GWT FocusProblems - gwt

How can I set the focus to the next tab index?
I have a form, that contains several widget and I would like to handler the tab key down, to set the focus from A widget to B

You can use
setTabIndex(int);
method to set the focus from widget A to widget B.

Related

How to change FAB icon within a StatelessWidget

I started with the default Statfull Widget HomePage and a FAB.
The main widget in the page is a ListBuilder that is updated from a stream using Provider.
When an item on the list is clicked, I need to change the icon on the FAB.
All this works fine.
Now I wonder, If I would like to change the home page as a StatelessWidget. So I don't need to build the entire page just to change the icon on the FAB.
How can I update the Icon if I don't have setState() to rebuild the page?
the best answer should be use some sort of state management, but here's a quick and easy way to achieve your goal
create a function in your parent widget
Function callback(){
setState((){
//change Icon
});
}
Then pass it on to your stateless widget
CustomFabWidget(callback)

Adding data from one List of Widgets to another List in Flutter

So I have a widget (a) which contains an animated list and an empty list of widgets (SelectedWorkoutsList). Then after tapping any of the widgets in the list, I navigate to another widget (b) and pass the SelectedWorkoutsList which is still empty using Navigator. meanwhile in widget (b) i have the SelectedWorkoutsList) which is still empty and another List(WorkoutObjects) which contains widgets. After selecting any of its widgets the widget should be added to the SelectedWorkoutsList passed from Widget (a) and if the user tapped another time on the same widget it should be removed. All of this work perfectly, my problem is that after adding the widgets and pop back to the first widget (a) and then Navigate to (b) I still have that SelectedWorkoutsList but if I select a widget which I already selected before popping, it will add it as a duplicate while it should remove it.
I am using this if condition to check whether that widget was a already selected or not.
onTap: () {
if(!selectedWorkoutsList.contains(workoutObjects[index])) {
selectedWorkoutsList.add(workoutObjects[index]);
}else{
selectedWorkoutsList.remove(workoutObjects[index]);
}
print(selectedWorkoutsList.length);
},
So i have the workoutObjects List which contains Widgets and onTap, i check if the selectedWorkoutsList contains the widget that the user tapped from workoutObjects is yes it is removed is no it is added. it works fine except when I pop back then navigate again.
I am using seState. I think the problem is related to HashCode of the objects in the list (workoutsObject). Every time I load the widget the workoutObject are recreated in the init state with new hashcodes so when I compare widget with another widget in the selectedList it doesn't recognize that they are the same because of the difference in hashcodes. Is there a way to override the hashcode and compare two widgets using different method?
The problem here, is when you pop a page off, the previous page still has it's previous state. So, anything removed from the selected list will still be there on old page. What state management system are you using?

check if a widget is on screen

Is there a way to detect if a widget is on screen/seen anywhere on the app. For example in a TabBar or a PageView.
I already know that I could use the widget's build method to detect this, but this results in some really weird behavior where sometimes the widget has already been built and when the user navigates to the screen nothing happens.
So is there any way to do this with an entire app?
Maybe you can try using widget key like a Global Key
final key = GlobalKey();
and they passes it to the widget you want to know the state

How to add and delete widget dynamically in flutter?

Here I added Stack widget in scaffold body. I added full screen image as background image and set edit text widget functionality on image.
I want to add Multiple Text Widget with delete and add widget functionality on button click in flutter. I mean when I Press on any particular Text widget it become enable and if I press on delete Icon, this particular selected widget delete on the stack widget.
How it could be possible in flutter? Any suggestion for it or I should use any other widget rather than Stack widget for this functionality.

Flutter : Show properties Widget without Hover the widget

I'm now it's very basic question but i want know it's possible show property widget without hover the widget or it have button combination ?
It's same like if i want add new widget , i only click the widget and press Ctrl + .
Thank's