Closed LucreziaC closed 2 years ago
@LucreziaC hi, I'll try to fix this, but I need more details. The slider version, and if possible the code that causes this problem.
Sure! The slider version is : 1.7.1 If application starts in portrait mode and then is switched to landscape mode, the problem occurs as I notified you in my last comment. If application starts in landscape mode and then is switched to portrait mode, the background colour remains stretched. The problem is also in your example class if I insert the isStretch field:
CustomSlidingSegmentedControl<int>(
controller: controller,
isStretch: true,
initialValue: initial,
height: 24,
children: {
1: const Text('News daily portal'),
2: const Text('Map'),
3: const Text('Paper'),
if (isPayment) 4: const Text('Metal Bord'),
},
decoration: BoxDecoration(
color: CupertinoColors.lightBackgroundGray,
borderRadius: BorderRadius.circular(8),
),
thumbDecoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(6),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(.3),
blurRadius: 4.0,
spreadRadius: 1.0,
offset: const Offset(
0.0,
2.0,
),
),
],
),
duration: const Duration(milliseconds: 300),
curve: Curves.easeInToLinear,
onValueChanged: (v) {
controller.value = v;
setState(() {
initial = v;
});
},
),
@LucreziaC i will try to solve the problem as soon as I have free time
@LucreziaC hello, I fixed a bug in version 1.7.2
Thank you for helping to make the library even better
By Increasing the height thumb height is not increasing .
If isStretch, the background color not stratching.
_Originally posted by @LucreziaC in https://github.com/hadukin/custom_sliding_segmented_control/issues/6#issuecomment-1234086812_