- Created clean architecture with data/domain/ui
- Added Ktor client in data
- Added repository interface for motivational quotes in domain
- Added respository interface implementation for motivational quotes in data
- Created expect actual implementation to get the HttpClientEngine to be able to then get the HttpClient.
- Since those differ based on the platform I created a
KtorClientPlatform that iOSMain and AndroidMain implement.
KtorClientPlatform file has KtorClient interface class which is used to get the HttpClientEngine
- Within that same file added a
KtorClientPlatform class that does one thing
val clientForPlatform: HttpClientEngine = getKtorClient().engine this makes it so we can use this class in either platform and get the correct ktor engine since we use the expect/actual pattern
- I then created a
expect fun getKtorClient(): KtorClient which has actual fun getKtorClient(): KtorClient = IosKtorClient()/AndroidKtorClient in iosMainand androidMain respectively.