deserializeOptional function
dynamic
deserializeOptional(
- Type self,
- SerialBuffer buffer, {
- SerializerState? state,
- dynamic allowExtensions = true,
Implementation
deserializeOptional(Type self, SerialBuffer buffer, {SerializerState? state, allowExtensions = true}) {
if (state == null) state = SerializerState();
if (buffer.get() != 0) {
return self.optionalOf!.deserialize?.call(self.optionalOf, buffer, state: state, allowExtensions: allowExtensions);
} else {
return null;
}
}