Skip to content

Commit 6113171

Browse files
committed
Fix size of header
1 parent 17ab85b commit 6113171

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/material_leap/lib/src/widgets/exact_slider.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class ExactSlider extends StatefulWidget {
1010
final Widget? header, leading, bottom;
1111
final double defaultValue, min, max;
1212
final double? value;
13+
final double? headerWidth;
1314
final OnValueChanged? onChanged, onChangeEnd;
1415
final Color? color, thumbColor;
1516
final EdgeInsets? contentPadding;
@@ -30,6 +31,7 @@ class ExactSlider extends StatefulWidget {
3031
this.onChanged,
3132
this.thumbColor,
3233
this.contentPadding,
34+
this.headerWidth,
3335
});
3436

3537
ExactSlider.srgb({
@@ -48,6 +50,7 @@ class ExactSlider extends StatefulWidget {
4850
this.onChanged,
4951
required SRGBColor thumbColor,
5052
this.contentPadding,
53+
this.headerWidth,
5154
}) : color = color.toColor(),
5255
thumbColor = thumbColor.toColor();
5356

@@ -172,7 +175,7 @@ class _ExactSliderState extends State<ExactSlider> {
172175
title: Row(
173176
children: [
174177
if (header != null) ...[
175-
SizedBox(width: 200, child: header),
178+
SizedBox(width: widget.headerWidth ?? 180, child: header),
176179
const SizedBox(width: 16),
177180
],
178181
ConstrainedBox(

0 commit comments

Comments
 (0)