CloneField<T> constructor

CloneField<T>(
  1. String name, {
  2. CloneGetterFunction? getter,
  3. CloneSetterFunction? setter,
  4. T? defaultValue,
})

The CloneField constructor

Note: need to set 'getter' and 'setter' as late since some functions might not be const and are not definable within the constructor parameters

Implementation

CloneField(this.name,
    {CloneGetterFunction? getter,
    CloneSetterFunction? setter,
    this.defaultValue}) {
  this.getter = getter ?? () => null;
  this.setter = setter ?? (_) {};
}