Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A class that contains the Base Context and interfaces for handling the States
class BaseContext(private var state: IBaseState) {
fun getState(): IBaseState {
return state
}
}
interface IBaseState {
fun setPackageExpiryVisibility()
}
interface IState1 : IBaseState {
fun setParams(@DrawableRes icon : Int, hasLimitedPackage : Boolean, totalFeature : Int, consumedFeature : Int , expiry : String)
}
interface IState2 : IBaseState {
fun setParams(@DrawableRes icon : Int, hasLimitedPackage : Boolean, totalFeature : Int, consumedFeature : Int )
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment