caitlynbakery / theta_x_bloc

0 stars 1 forks source link

Develop Strategy to Divide theta_bloc.dart file into multiple components #4

Closed codetricity closed 2 years ago

codetricity commented 2 years ago

Review available strategies from community to divide bloc file into multiple parts. List possible strategies

https://medium.com/codechai/effective-bloc-pattern-45c36d76d5fe

Just One of Many Possibilities - Every Screen has One BLoC

image

https://stackoverflow.com/questions/72413739/what-to-do-if-a-bloc-gets-too-large

https://bloclibrary.dev/#/architecture

Other strategies

Additional searches on Google may help.

This Udemy course may be useful.

https://www.udemy.com/share/105ZOo3@l2mYv_CgJh0S_3XawwAo8QtE_9Y0UnGgP9iaXFS8xZCuh6qH8TCnZV7JwZr9OvB1/

Divide BloCs by function


Example

  1. use camera bloc
    1. shutter - > if in image mode, then takePicture, else startCapture (video)
    2. if in video mode, show stop video button, when video is recording, else do not display
    3. shooting settings button (maybe gear) -> navigate to shooting settings screen
  2. shooting settings bloc
    1. if in video mode, show
      1. 8K 2fps
      2. 4K 30fps
      3. 8K 10fps
      4. EV compensation
      5. bitrate
      6. video stitching
    2. if in still image mode, show
      1. 11K
      2. 5.5K
      3. self-timer
      4. EV compensation
      5. stitching
      6. aiAutoThumbnail
      7. GPS
      8. faceDetect
  3. camera info bloc
    1. info,
    2. state
    3. battery - always on screen
    4. firmware version
    5. list plugins
  4. list files bloc
    1. list 10 file names as textbuttons
    2. list last file
    3. toggle button for details or metadata
    4. show metadata or details on button click
  5. display file bloc
codetricity commented 2 years ago

I'm going to move the discussion to this repo:

https://github.com/codetricity/oppkey_theta_x_app_status/issues