Skip to content

Commit

Permalink
Fix size of header
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeDoctorDE committed Jan 4, 2025
1 parent 17ab85b commit 6113171
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/material_leap/lib/src/widgets/exact_slider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class ExactSlider extends StatefulWidget {
final Widget? header, leading, bottom;
final double defaultValue, min, max;
final double? value;
final double? headerWidth;
final OnValueChanged? onChanged, onChangeEnd;
final Color? color, thumbColor;
final EdgeInsets? contentPadding;
Expand All @@ -30,6 +31,7 @@ class ExactSlider extends StatefulWidget {
this.onChanged,
this.thumbColor,
this.contentPadding,
this.headerWidth,
});

ExactSlider.srgb({
Expand All @@ -48,6 +50,7 @@ class ExactSlider extends StatefulWidget {
this.onChanged,
required SRGBColor thumbColor,
this.contentPadding,
this.headerWidth,
}) : color = color.toColor(),
thumbColor = thumbColor.toColor();

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

0 comments on commit 6113171

Please sign in to comment.