Add dependency injection
This commit is contained in:
parent
151ed6d78b
commit
bf94769573
9 changed files with 140 additions and 51 deletions
16
ios/Native/Utils/DI/Injected.swift
Normal file
16
ios/Native/Utils/DI/Injected.swift
Normal file
|
@ -0,0 +1,16 @@
|
|||
//
|
||||
// Injected.swift
|
||||
// Vitaway
|
||||
//
|
||||
// Created by Artur Gurgul on 05/07/2025.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
@propertyWrapper
|
||||
class Injected<T> {
|
||||
var wrappedValue: T {
|
||||
DependencyContainer.shared.resolve(type: T.self)
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue