SingleData constructor
Implementation
SingleData(this.down, this.up, {String? id, this.x}) {
if (id != null && id.isNotEmpty) {
this.id = id;
} else {
this.id = const Uuid().v4().toString().replaceAll('-', '');
}
if (up < down) {
throw FlutterError('maxData must more than minData');
}
if (x != null) {
if (!(x is num || x is String)) {
throw FlutterError('x only support num or string');
}
}
}