FdcGridPageSizeSelector constructor
FdcGridPageSizeSelector({})
Creates a FdcGridPageSizeSelector.
Implementation
FdcGridPageSizeSelector({
super.id,
super.visible,
super.placement = FdcGridItemPlacement.end,
this.label = '',
List<int> options = const <int>[100, 500, 1000, 5000, 10000],
}) : options = List<int>.unmodifiable(options) {
int? invalidOption;
for (final option in this.options) {
if (option <= 0) {
invalidOption = option;
break;
}
}
if (invalidOption != null) {
throw RangeError.value(
invalidOption,
'options',
'Every page-size option must be greater than zero.',
);
}
if (this.options.toSet().length != this.options.length) {
throw ArgumentError.value(
options,
'options',
'Page-size options must not contain duplicates.',
);
}
}