diff --git a/lib/src/widgets/non_linear_slider.dart b/lib/src/widgets/non_linear_slider.dart index e373d882f2..1b3dcd5e05 100644 --- a/lib/src/widgets/non_linear_slider.dart +++ b/lib/src/widgets/non_linear_slider.dart @@ -3,13 +3,14 @@ import 'package:flutter/material.dart'; /// Platform adaptive slider that allows for non-linear values. class NonLinearSlider extends StatefulWidget { - const NonLinearSlider({ + NonLinearSlider({ required this.value, required this.values, this.labelBuilder, this.onChangeEnd, super.key, - }); + }) : assert(values.length > 1), + assert(values.contains(value)); final num value; final List values;