File tree Expand file tree Collapse file tree
packages/material_leap/lib/src/widgets Expand file tree Collapse file tree Original file line number Diff line number Diff 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 (
You can’t perform that action at this time.
0 commit comments