Architecture question - I have an enum in a share...
# multiplatform
c
Architecture question - I have an enum in a shared module that I would like to map some icon resource ids to for use in my android module. Whats a sensible way to go about this? • create a new enum in android with the shared enum value as one of it's properties? • create an extension function for the shared enum that maps it's values to icon resource ids? • other?
z
I have been doing the second method of having an extension function and a when statement
m
I think introducing a new type would cause more problems than it solves. I'd go with defining a map of values to resources id and adding a simple extension function that gets the resource id from the private map. I want to add that even if it were just an Android project, I'd prefer to separate resource IDs (presentation layer) from business layer.
c
Thanks for the input folks - that also sounds like the best approach to me!