i want to use _countryClient the same as DI with Provider and my problem is when i try to define country_client.dart to use that with ProxyProvider, my CountryListScreenModel class of mine no longer have a constructor parameter named _countryRepository
now how can i define CountryListScreenModel with ProxyProvider or other provider to use getAllCountries() function of that? because i don't have implementation the same as :
in
Country
sample code we have this implementation intomain.dart
:and ower
country_client.dart
class is:and providers is:
i want to use
_countryClient
the same asDI
withProvider
and my problem is when i try to definecountry_client.dart
to use that withProxyProvider
, myCountryListScreenModel
class of mine no longer have a constructor parameter named_countryRepository
my
RestClient
class:my
rest_client
provider:i defined
CountryRepository
class withProxyProvider
to useRestClient
which is defined as above, contrary to what you have defined in the code.my code:
your code:
now how can i define
CountryListScreenModel
withProxyProvider
or otherprovider
to usegetAllCountries()
function of that? because i don't have implementation the same as :how can i define CountryRepository into provider such as
ProxyProvider
to use that intoCountryListScreenModel
class?👉👉👉UPDATED GITHUB REPOSITORY👈👈👈