numConverter function

StateValue numConverter(
  1. dynamic value,
  2. StateElement parent
)

This built in converter will convert all ints and doubles to StateValue

Implementation

StateValue numConverter(value, StateElement parent) {
  if (value is num) return StateValue<num>(value, parent);
  return null;
}