nilshenrich / FileTreeHasher

Cross plattform tool to automatically hash and check single file or whole directory tree
https://nilshenrich.github.io/FileTreeHasher/
MIT License
0 stars 0 forks source link

Restructuring to not need to read widget state from outer code #43

Closed nilshenrich closed 7 months ago

nilshenrich commented 11 months ago

Currently, the program is working with loops and recursion getting tree-item widget status and processing on it. As the tree-items are StatefulWidgets now, it's bad practice getting current state.\ Better set a trigger from outer code and let the widgets itself do the processing.

nilshenrich commented 11 months ago

First implement #44

nilshenrich commented 11 months ago
nilshenrich commented 11 months ago
  • For generating hash file: Let each item append to file content directly -> File growes dynamically

    • For loading hash file: Read file line by line (async) and trigger event for each line containing the path, so each item can check if hash belongs to it

    • For Updating comparison input:

      • Clear: trigger one event all items listen to
      • Set content: Belongs to "loading hash file"

Generating hash file: Beside the item itself, each folder should store the stream controller as well to trigger item to update hash file.\ Folder: Trigger all direct children consecutively to update hash file\ File: Open hash file from given path in append mode and add line

nilshenrich commented 7 months ago

Done with f5fb8fcd5244e998de1176ab4ec7491077ced2fe