ExemplarCharacters.numbers constructor

ExemplarCharacters.numbers(
  1. DataProvider provider,
  2. Locale locale
)

See the Rust documentation for try_new_numbers for more information.

Throws DataError on failure.

Implementation

factory ExemplarCharacters.numbers(DataProvider provider, Locale locale) {
  final result = _icu4x_ExemplarCharacters_try_new_numbers_mv1(provider._ffi, locale._ffi);
  if (!result.isOk) {
    throw DataError.values[result.union.err];
  }
  return ExemplarCharacters._fromFfi(result.union.ok, []);
}