AttributeInteger.fromMap constructor

AttributeInteger.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory AttributeInteger.fromMap(Map<String, dynamic> map) {
  return AttributeInteger(
    key: map['key'].toString(),
    type: map['type'].toString(),
    status: map['status'].toString(),
    error: map['error'].toString(),
    xrequired: map['required'],
    array: map['array'],
    min: (map['min'] is String) ? int.tryParse(map['min']) : map['min'],
    max: (map['max'] is String) ? int.tryParse(map['max']) : map['max'],
    xdefault: (map['default'] is String)
        ? int.tryParse(map['default'])
        : map['default'],
  );
}