Skip to content

Commit b8539e1

Browse files
authored
Hide Strokestyle options if solid (#1140)
* Hide Strokestyle options if solid * Simplify code
1 parent aeba21a commit b8539e1

1 file changed

Lines changed: 22 additions & 24 deletions

File tree

app/lib/selections/tools/shape.dart

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -508,32 +508,30 @@ class _StrokeStyleSectionState extends State<_StrokeStyleSection> {
508508
),
509509
),
510510
body: Column(
511-
children: [
512-
ExactSlider(
513-
header: Text(AppLocalizations.of(context).dashLength),
514-
value: property.dashMultiplier,
515-
min: 0.1,
516-
max: 5,
517-
defaultValue: 1,
518-
onChangeEnd: isStyled
519-
? (value) => widget.onPropertyChanged(
511+
children: isStyled
512+
? [
513+
ExactSlider(
514+
header: Text(AppLocalizations.of(context).dashLength),
515+
value: property.dashMultiplier,
516+
min: 0.1,
517+
max: 5,
518+
defaultValue: 1,
519+
onChangeEnd: (value) => widget.onPropertyChanged(
520520
property.copyWith(dashMultiplier: value),
521-
)
522-
: null,
523-
),
524-
ExactSlider(
525-
header: Text(AppLocalizations.of(context).gapLength),
526-
value: property.gapMultiplier,
527-
min: 0.1,
528-
max: 5,
529-
defaultValue: 1,
530-
onChangeEnd: isStyled
531-
? (value) => widget.onPropertyChanged(
521+
),
522+
),
523+
ExactSlider(
524+
header: Text(AppLocalizations.of(context).gapLength),
525+
value: property.gapMultiplier,
526+
min: 0.1,
527+
max: 5,
528+
defaultValue: 1,
529+
onChangeEnd: (value) => widget.onPropertyChanged(
532530
property.copyWith(gapMultiplier: value),
533-
)
534-
: null,
535-
),
536-
],
531+
),
532+
),
533+
]
534+
: [],
537535
),
538536
),
539537
],

0 commit comments

Comments
 (0)