Skip to content

Commit

Permalink
Add assertions to NonLinearSlider
Browse files Browse the repository at this point in the history
  • Loading branch information
veloce committed Jul 31, 2023
1 parent 949302b commit 99248c2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/src/widgets/non_linear_slider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<num> values;
Expand Down

0 comments on commit 99248c2

Please sign in to comment.