write method Null safety

void write(
  1. dynamic data
)

Implementation

void write(Uint8List data) {
  if (isValid) {
    if (data.length != bytes!.length) throw Exception("Size data not equals size NativeDataStruct");

    bytes!.setAll(0, data);
  }
}