Skip to content

Constructing Usecase object may initialize infrastructure resources #8

@darwingr

Description

@darwingr

Issues

  • ERROR: Tries to load the rootBundle via CSVTableFile.fromAssetBundle(path) before flutter's runApp() is executed. Thus needed flutter plugins & resources are not yet available.
  • ERROR: Even a Future could still execute too early
  • PERF: Potential opening a file/resource every time a portion of the widget tree is rebuilt?
  • PERF: Potential reloading the CSV into List every time a portion of the widget tree is rebuilt?

Under Build # 4

  • Main() constructs/initializes repository on the provider
    • Construction of a CSVRepository in turn constructs/initializes the CSVTableFile
      • Construction of CSVTableFile assigns the future computation to load/parse the file
      • Likely acquires the space for it at the same time. Is Future<List<List>> heap bound?
  • BingoCardScreen, a stateful widget, initializes/constructs the usecase while taking an existing instance of the repository as a parameter.
  • BingoCardBloc takes the existing instance of the repository from the RepoProvider in its constructor when it assigns a usecase

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions