ListFormatter.andWithLengthAndProvider constructor
- DataProvider provider,
- Locale locale,
- ListLength length
Construct a new ListFormatter instance for And patterns
See the Rust documentation for try_new_and
for more information.
Throws DataError on failure.
Implementation
factory ListFormatter.andWithLengthAndProvider(DataProvider provider, Locale locale, ListLength length) {
final result = _icu4x_ListFormatter_create_and_with_length_and_provider_mv1(provider._ffi, locale._ffi, length.index);
if (!result.isOk) {
throw DataError.values[result.union.err];
}
return ListFormatter._fromFfi(result.union.ok, []);
}