How to create multiple instance of ViewModel using the old Dagger 2 approach?

Using the old ways with Dagger 2 for injecting ViewModel, how to create multiple instance of the same ViewModel for ViewPager?

@Singleton
class ViewModelProviderFactory @Inject constructor(
    private val creators: Map<Class<out ViewModel>, @JvmSuppressWildcards Provider<ViewModel>>
) : ViewModelProvider.Factory {
    override fun <T : ViewModel> create(modelClass: Class<T>): T {
        val creator = creators[modelClass] ?: creators.entries.firstOrNull {
            modelClass.isAssignableFrom(it.key)
        }?.value
        ?: throw IllegalArgumentException("Unknown ViewModel $modelClass. You probably forgot to include your ViewModel module to ViewModelFactory module or map it with the ViewModelKey annotation?")
        @Suppress("UNCHECKED_CAST")
        return creator.get() as T
    }
}

@Module(
    includes = [
        SampleViewModelModule::class,
        SampleCopyViewModelModule::class,
    ]
)
abstract class ViewModelFactoryModule {

    @Binds
    abstract fun bindViewModelFactory(viewModelProviderFactory: ViewModelProviderFactory): ViewModelProvider.Factory

}
Modules
@Module
object SampleViewModelModule {

    @Provides
    @IntoMap
    @ViewModelKey(SampleViewModel::class)
    fun provideSampleViewModel(
        useCase: GetSampleUseCase
    ): ViewModel = MessariPriceViewModel(useCase)

    @Provides
    @Named("FragmentOne")
    fun provideSampleViewModelProvider(
        owner: FragmentOne,
        factory: ViewModelProvider.Factory
    ) = ViewModelProvider(owner, factory)[SampleViewModel::class.java]

}

@Module
object SampleCopyViewModelModule {

    @Provides
    @IntoMap
    @ViewModelKey(SampleViewModel::class)
    fun provideSampleCopyViewModel(
        useCase: GetMessariPricesUseCase
    ): ViewModel = MessariPriceViewModel(useCase)

    @Provides
    @Named("FragmentTwo")
    fun provideSampleCopyViewModelProvider(
        owner: FragmentTwo,
        factory: ViewModelProvider.Factory
    ) = ViewModelProvider(owner, factory)[SampleViewModel::class.java]

}

@Module
abstract class FragmentMainBuildersModule {

    @ContributesAndroidInjector(modules = [SampleModelModule::class])
    abstract fun contributeFragmentOne(): FragmentOne

    @ContributesAndroidInjector(modules = [SampleCopyModelModule::class])
    abstract fun contributeFragmentTwo(): FragmentTwo

}

@Module
abstract class ActivityBuildersModule {

    @ContributesAndroidInjector(modules = [FragmentMainBuildersModule::class])
    abstract fun contributeMainActivity(): MainActivity

}

Component

@Singleton
@Component(
    modules = [
        AndroidSupportInjectionModule::class, // Default module, always on top
        ViewModelFactoryModule::class, // Injecting ViewModel happens here
        ActivityBuildersModule::class, // Injecting Activity and Fragment happens here
    ]
)
interface AppComponent : AndroidInjector<App> {

    // Override the builder
    @Component.Builder
    interface Builder {

        // We can now access and inject Application class anywhere in this project
        // as long as that consumer class is also injected/registered in Dagger
        @BindsInstance
        fun application(application: Application): Builder

        fun build(): AppComponent

    }

}

Accessing it in Fragment like the below will throw build error

@Inject
@Named("FragmentOne")
override lateinit var viewModel: SampleViewModel

Error

[Dagger/MapKeys] The same map key is bound more than once

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật