Would my implementation of this enum pass? I have a feature with feature flagging enabled, basis the condition I want to load different pages in my screen, to achieve this I have the following enum: 

enum class ImageHolderEnum(
    val titleId: Int,
    val qFragment: BaseFragment,
    val fragment: BaseFragment
) : IPageHolder {
    PAGE1(R.string.tab_shop_baby, BabyTwoFragment(), BabyThreeFragment()) {
        override fun getTitle(): Int = titleId
        override fun getFragmentToAdd(): BaseFragment =
            if (isFeatureAllowed()) qFragment else fragment
    },
    PAGE2(R.string.tab_shop_mom, MomThreeFragment(), MomTwoFragment()) {
        override fun getTitle(): Int = titleId
        override fun getFragmentToAdd(): BaseFragment =
            if (isFeatureAllowed()) qFragment else fragment
    },
    PAGE3(R.string.tab_shop_dad, DadTwoFragment(), DadThreeFragment()) {
        override fun getTitle(): Int = titleId
        override fun getFragmentToAdd(): BaseFragment =
            if (isFeatureAllowed()) qFragment else fragment
    };

    fun isFeatureAllowed(): Boolean  {
        val qSlideConfig: QSlideConfig by remoteFeatureFlag() // Kind of dependency injection here 
        return qSlideConfig.isQSlideEnabled()
    }
}


The interface is as follows: 

interface IPageHolder {
    fun getTitle(): Int
    fun getFragmentToAdd(): BaseFragment
}


I am concerned if I am using the dependency injection inside the enum and breaking some principles.
Why are you giving seperate implementations for each enum value? All getTitle() and getFragmentToAdd() implementations are the same.

enum class ImageHolderEnum(
    val titleId: Int,
    val qFragment: BaseFragment,
    val fragment: BaseFragment
) : IPageHolder {
    PAGE1(R.string.tab_shop_baby, BabyTwoFragment(), BabyThreeFragment()),
    PAGE2(R.string.tab_shop_mom, MomThreeFragment(), MomTwoFragment()),
    PAGE3(R.string.tab_shop_dad, DadTwoFragment(), DadThreeFragment()),
    ;

    override fun getTitle(): Int = titleId
    override fun getFragmentToAdd(): BaseFragment = if (isFeatureAllowed()) qFragment else fragment

    fun isFeatureAllowed(): Boolean  {
        val qSlideConfig: QSlideConfig by remoteFeatureFlag() // Kind of dependency injection here 
        return qSlideConfig.isQSlideEnabled()
    }
}


Interfaces can also have properties, so there's no need to have getTitle() as a function, when it can just be a value.

interface IPageHolder {
    val titleId: Int
    fun getFragmentToAdd(): BaseFragment
}


And you can then use it like this in the enum class:

enum class ImageHolderEnum(
    override val titleId: Int,
    ...