init method

  1. @override
SingleArg<T> init({
  1. required String name,
})
override

Creates a copy of this using the provided name for late initialization. If $name was already set, it should have precedence over name.

Example: Arg(0).init(name: 'integer') => Arg(0, name: 'integer') Arg(0, name: 'int').init(name: 'integer') => Arg(0, name: 'int')

Implementation

@override
SingleArg<T> init({
  required String name,
}) {
  return SingleArg<T>(
    value,
    name: $name == null ? name : $name,
    values: values,
    labelBuilder: labelBuilder,
  );
}