Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no need to use if statement #124

Merged
merged 1 commit into from
Jan 20, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions lib/src/colorpicker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -579,10 +579,8 @@ class _SlidePickerState extends State<SlidePicker> {

@override
Widget build(BuildContext context) {
double fontSize = 14;
if (widget.labelTextStyle != null && widget.labelTextStyle?.fontSize != null) {
fontSize = widget.labelTextStyle?.fontSize ?? 14;
}
final double fontSize = widget.labelTextStyle?.fontSize ?? 14;

final List<TrackType> trackTypes = [
if (widget.colorModel == ColorModel.hsv) ...[TrackType.hue, TrackType.saturation, TrackType.value],
if (widget.colorModel == ColorModel.hsl) ...[TrackType.hue, TrackType.saturationForHSL, TrackType.lightness],
Expand Down Expand Up @@ -641,7 +639,7 @@ class _SlidePickerState extends State<SlidePicker> {
);
}
}

/// The Color Picker with HUE Ring & HSV model.
class HueRingPicker extends StatefulWidget {
const HueRingPicker({
Expand Down