UtilityWithRadiusTokens<T>.shorthand constructor

UtilityWithRadiusTokens<T>.shorthand(
  1. T fn(
    1. Radius p1, [
    2. Radius? p2,
    3. Radius? p3,
    4. Radius? p4,
    ])
)

Implementation

factory UtilityWithRadiusTokens.shorthand(
  T Function(Radius p1, [Radius? p2, Radius? p3, Radius? p4]) fn,
) {
  // Need to accept a type with positional params, and convert it into a function that accepts a double and returns T
  return UtilityWithRadiusTokens((Radius value) => fn(value));
}