'Android Compose - multi module Scaffold and dynamic topBar

To all the Clean Architecture and Multi Module experts I ask how best to manage the following:

I have a ANDROID (Kotlin) COMPOSE app with multiple module which are 99% independent of each other, however the topBar and bottomBar is kept in the :app module

Question is if each of the modules have different title, left and right icons how do I manage this cleanly? So when the use navigates from one module to another and the topBar has to change how do I pass the correct properties?

Same with the bottomBar which is enabled in some of the module screens but disabled in others?

Currently I have a STATE at :app level which I use to update the topBar and bottomBar but that means passing the appState down all composables which does seem to be very clean.

Any suggestions how to manage this better? Perhaps a Scaffold at module level, also seems wrong?

Thanks J



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source