number static method

Map<String, dynamic> number({
  1. String? description,
  2. bool required = false,
  3. num? defaultValue,
})

Create a number property schema

Implementation

static Map<String, dynamic> number({
  String? description,
  bool required = false,
  num? defaultValue,
}) {
  final schema = <String, dynamic>{
    'type': 'number',
    if (description != null) 'description': description,
    if (defaultValue != null) 'default': defaultValue,
  };
  return schema;
}