onInvalidWrite property
final
A function called if an invalid write is made when not isEmpty.
An invalid write will reset the entire memory after calling this function.
By default, this will print a warning message.
Implementation
final void Function() onInvalidWrite;