encode<T> method
dynamic
encode<T>(
- T value,
- dynamic fn(
- T value
Implementation
dynamic encode<T>(T value, dynamic Function(T value) fn) {
if (this == null) return fn(value);
var v = this!.beforeEncode(value);
if (v is T) v = fn(v);
return this!.afterEncode(v);
}