create method

  1. @override
IModuleCodeContributor create(
  1. ModuleProfile profile
)

Implementation

@override
IModuleCodeContributor create(ModuleProfile profile) {
  // I'm aware this breaks the SOLID OCP Principle.
  // Avoiding it would require a significantly more complex architecture
  // with many entities, so this pragmatic approach is acceptable for now.
  return switch (profile.stateManager) {
    StateManager.bloc => SmfHomeBlocModule(),
    StateManager.riverpod => SmfHomeRiverpodModule(),
  };
}