selfCreateString method

  1. @override
String selfCreateString(
  1. FloatRangeValidator validator
)
override

Returns Dart code that re-creates the Validatable instance or the equivalent Converter instance that can be used to convert properties of the type the validator validates.

Implementation

@override
String selfCreateString(FloatRangeValidator validator) {
  final typeName = validator.runtimeType;
  return "Validatable(${schemaTypeString(const Floats(), const DartGeneratorOptions())}, "
      "$typeName(${validator.min}, ${validator.max}))";
}