prepare method Null safety

  1. @mustCallSuper
void prepare()
@mustCallSuper, inherited

Prepare the object to be written to the stream