WeekInformation.withProvider constructor
- DataProvider provider,
- Locale locale
Creates a new WeekInformation from locale data using a particular data source.
See the Rust documentation for try_new
for more information.
Throws DataError on failure.
Implementation
factory WeekInformation.withProvider(DataProvider provider, Locale locale) {
final result = _icu4x_WeekInformation_create_with_provider_mv1(provider._ffi, locale._ffi);
if (!result.isOk) {
throw DataError.values[result.union.err];
}
return WeekInformation._fromFfi(result.union.ok, []);
}