Skip to content

Commit 113618a

Browse files
authored
Merge pull request #124 from Carlosg19/patch-1
no need to use if statement
2 parents 29b6918 + 79441d4 commit 113618a

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lib/src/colorpicker.dart

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -579,10 +579,8 @@ class _SlidePickerState extends State<SlidePicker> {
579579

580580
@override
581581
Widget build(BuildContext context) {
582-
double fontSize = 14;
583-
if (widget.labelTextStyle != null && widget.labelTextStyle?.fontSize != null) {
584-
fontSize = widget.labelTextStyle?.fontSize ?? 14;
585-
}
582+
final double fontSize = widget.labelTextStyle?.fontSize ?? 14;
583+
586584
final List<TrackType> trackTypes = [
587585
if (widget.colorModel == ColorModel.hsv) ...[TrackType.hue, TrackType.saturation, TrackType.value],
588586
if (widget.colorModel == ColorModel.hsl) ...[TrackType.hue, TrackType.saturationForHSL, TrackType.lightness],
@@ -641,7 +639,7 @@ class _SlidePickerState extends State<SlidePicker> {
641639
);
642640
}
643641
}
644-
642+
645643
/// The Color Picker with HUE Ring & HSV model.
646644
class HueRingPicker extends StatefulWidget {
647645
const HueRingPicker({

0 commit comments

Comments
 (0)