LineSegmenter.dictionaryWithOptionsAndProvider constructor
- DataProvider provider,
- LineBreakOptions options, [
- Locale? contentLocale
Construct a LineSegmenter with custom options and dictionary payload data for Burmese, Khmer, Lao, and Thai, using a particular data source.
See the Rust documentation for new_dictionary
for more information.
Throws DataError on failure.
Implementation
factory LineSegmenter.dictionaryWithOptionsAndProvider(DataProvider provider, LineBreakOptions options, [Locale? contentLocale]) {
final temp = _FinalizedArena();
final result = _icu4x_LineSegmenter_create_dictionary_with_options_v2_and_provider_mv1(provider._ffi, contentLocale?._ffi ?? ffi.Pointer.fromAddress(0), options._toFfi(temp.arena));
if (!result.isOk) {
throw DataError.values[result.union.err];
}
return LineSegmenter._fromFfi(result.union.ok, []);
}