Skip to content

Commit

Permalink
[Presentation] Added a little bit of margin to the material list with…
Browse files Browse the repository at this point in the history
… slider
  • Loading branch information
Wolfteam committed Mar 1, 2024
1 parent c20dc51 commit ce2b578
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions lib/presentation/shared/details/detail_materials.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,24 +67,26 @@ class _DetailMaterialsSliderColumnState extends State<DetailMaterialsSliderColum
),
FractionallySizedBox(
widthFactor: 0.8,
child: SliderTheme(
data: SliderThemeData.fromPrimaryColors(
primaryColor: widget.color,
primaryColorDark: widget.color,
primaryColorLight: widget.color,
valueIndicatorTextStyle: theme.textTheme.bodySmall!,
).copyWith(
overlayShape: SliderComponentShape.noOverlay,
trackHeight: 5,
thumbShape: const RoundSliderThumbShape(enabledThumbRadius: 8),
),
child: Slider(
value: _currentIndex.toDouble(),
onChanged: (val) => _onAddOrRemove(val.toInt()),
label: '${s.level}: ${_current.level}',
max: widget.data.length - 1,
activeColor: widget.color,
divisions: widget.data.length - 1,
child: Container(
margin: const EdgeInsets.only(bottom: 15),
child: SliderTheme(
data: SliderThemeData.fromPrimaryColors(
primaryColor: widget.color,
primaryColorDark: widget.color,
primaryColorLight: widget.color,
valueIndicatorTextStyle: theme.textTheme.bodySmall!,
).copyWith(
overlayShape: SliderComponentShape.noOverlay,
trackHeight: 5,
),
child: Slider(
value: _currentIndex.toDouble(),
onChanged: (val) => _onAddOrRemove(val.toInt()),
label: '${s.level}: ${_current.level}',
max: widget.data.length - 1,
activeColor: widget.color,
divisions: widget.data.length - 1,
),
),
),
),
Expand Down

0 comments on commit ce2b578

Please sign in to comment.