Closed nilshenrich closed 12 months ago
The items list is built recursively and passed completely to the widget builder only once. The list must be updated step by step and the widget builder must be updated every time
Development steps:
_loadedTrees
directly instead local variable_loadedTrees
in recursionsDevelopment steps:
1. Modify `_loadedTrees` directly instead local variable 2. Update state on every added item. Only top level files for the first try 3. Pass reference to inner sub-tree to update `_loadedTrees` in recursions
setState
doesn't update directly. The program still waits for the end of _showNewFolder
and updates everything together
Development steps:
1. Modify `_loadedTrees` directly instead local variable 2. Update state on every added item. Only top level files for the first try 3. Pass reference to inner sub-tree to update `_loadedTrees` in recursions
setState
doesn't update directly. The program still waits for the end of_showNewFolder
and updates everything together
I saw the button hover focus and tooltip stays as long as the selectNewFolder
is running, so the GUI seems frozen for this time\
-> Call async?
Live update works for hash generation.
Test: Not working if trying to increase slowly in non-async function: 0e7ed8263352ccaefbe946ce0753375eaabf7cd8
Live update works for hash generation.
Test: Not working if trying to increase slowly in non-async function: 0e7ed8263352ccaefbe946ce0753375eaabf7cd8
Still not working within async method: da172dbe41ad8d5827a92e376d598437ef647b5f
It is not possible to update a StatelessWidget like T_FileTreeView dynamically as after first setState, the widget is recreated and a dynamic sub-pointer loses its connection.
-> Better making the T_FileTreeView a StatefulWidget where items can be added dynamically using a method
It is not possible to update a StatelessWidget like T_FileTreeView dynamically as after first setState, the widget is recreated and a dynamic sub-pointer loses its connection.
-> Better making the T_FileTreeView a StatefulWidget where items can be added dynamically using a method
Can T_FileTreeView be a specialized T_FolderView ? Then there would be no difference between adding items to folder or to tree.
Use provider to manage state changes from outside a widget.\ Insight the ChangeNotifier class the subitems shall be buffered and the load shall be called. A folder can be stateless then.
Use provider to manage state changes from outside a widget. Insight the ChangeNotifier class the subitems shall be buffered and the load shall be called. A folder can be stateless then.
Folder must stay stateful because the content shall be able to be collapsed and expanded
Next steps on branch "provider" (e3707678549db1cae0e42a5a2aa67f24e1380890):
Works now with 5e83498124b2b2bc4e91dc38d913bb65fdd57fb0.
But the view is not updated as long the folder stays expanded. Only collapsing and expanding updates the view
Works now with 5e83498.
But the view is not updated as long the folder stays expanded. Only collapsing and expanding updates the view
Make widgets stateful?
Works now with 5e83498.
But the view is not updated as long the folder stays expanded. Only collapsing and expanding updates the view
Make widgets stateful?
Or the widget could be recreated with children. Either in add method or manually after adding a child.
Done with 445c4fece9086194a9459bfd54ea43fa76de9c44
When selecting a new folder to load, the complete widget tree is created and the GUI is updated once the creation process is finished.\ When loading big folders, this takes some time making the GUI stuck.
The folder loading process shall be visible on the GUI.