Closed endruuu closed 3 years ago
Create a manual dependency injection.
Normally we use Dagger or Koin for dependency injection. However, it turns out that:
Since they are not possible, I just created a very simple manual dependency injection. Usage:
// Initialize DI val iterateDI = IterateDI(context) // To get the repository iterateDI.iterateRepository
Reference: https://developer.android.com/training/dependency-injection/manual#dependencies-container
I checked that Stripe uses Dagger, but it doesn't enforce users to initialize the dependency injection within their Application file. Let me check it again later. I will close this PR first.
Create a manual dependency injection.
Normally we use Dagger or Koin for dependency injection. However, it turns out that:
Since they are not possible, I just created a very simple manual dependency injection. Usage:
Reference: https://developer.android.com/training/dependency-injection/manual#dependencies-container