Skip to content

JSDataViewToByteData

extension JSDataViewToByteData on JSDataView

Conversions from JSDataView to ByteData.

Properties

toDart extension no setter

ByteData get toDart

Converts this JSDataView to a ByteData by either casting or wrapping it.

INFO

Depending on whether code is compiled to JavaScript or Wasm, this conversion will have different semantics.

When compiling to JavaScript, ByteDatas are JSDataViews and this operation will be a cast.

When compiling to Wasm, the JSDataView is wrapped with a ByteData implementation and the wrapper is returned.

Modifications to this JSDataView will affect the returned ByteData and vice versa.

Available on JSDataView, provided by the JSDataViewToByteData extension

Implementation
dart
external ByteData get toDart;