FLUTTER: What is the best state management approach for infinite number of nested screens

Viewed 36

Hi I am developing and application that showing list of document and editing document.

In every document there is a possibility of having a lots of nested document as well. If I edit child document, parent document state have to change. I also need to access parent document in any nested level of child document.

What is the best state management approach for me to invest in this application

Summary of application:

List of Document screen => Clicking a document => showing a Edit screen of document=> clicking one of the child document => List screen=> same cycle

If possible please show me with simple code example

Thanks a lot for your time.

1 Answers

hope I understand what you want.

you can start by create structure as Tree every item has parameter parent now we can access to all item by write "recursive method" and can edit any item with parent

NOW WHAT STATE MANAGEMENT SHOULD I USE

you can do that in any state management you know Bloc River Pod. I recommended to use Bloc its help you to separate logic and state and have a lot of features

I hope that help you to get started

Related