DataProvider.fromByteSlice constructor
- ByteBuffer blob
See the Rust documentation for try_new_from_blob
for more information.
Throws DataError on failure.
Implementation
factory DataProvider.fromByteSlice(ByteBuffer blob) {
final result = _icu4x_DataProvider_from_owned_byte_slice_mv1(blob.asUint8List()._uint8AllocIn(_RustAlloc()));
if (!result.isOk) {
throw DataError.values[result.union.err];
}
return DataProvider._fromFfi(result.union.ok, []);
}