fix: 动态tab取消splashColor
This commit is contained in:
@ -127,55 +127,64 @@ class _DynamicsPageState extends State<DynamicsPage>
|
|||||||
() => _dynamicsController.userLogin.value
|
() => _dynamicsController.userLogin.value
|
||||||
? Visibility(
|
? Visibility(
|
||||||
visible: _dynamicsController.mid.value == -1,
|
visible: _dynamicsController.mid.value == -1,
|
||||||
child: CustomSlidingSegmentedControl<int>(
|
child: Theme(
|
||||||
initialValue:
|
data: ThemeData(
|
||||||
_dynamicsController.initialValue.value,
|
splashColor:
|
||||||
children: {
|
Colors.transparent, // 点击时的水波纹颜色设置为透明
|
||||||
0: Text(
|
highlightColor:
|
||||||
'全部',
|
Colors.transparent, // 点击时的背景高亮颜色设置为透明
|
||||||
style: TextStyle(
|
),
|
||||||
fontSize: Theme.of(context)
|
child: CustomSlidingSegmentedControl<int>(
|
||||||
.textTheme
|
initialValue:
|
||||||
.labelMedium!
|
_dynamicsController.initialValue.value,
|
||||||
.fontSize),
|
children: {
|
||||||
|
0: Text(
|
||||||
|
'全部',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: Theme.of(context)
|
||||||
|
.textTheme
|
||||||
|
.labelMedium!
|
||||||
|
.fontSize),
|
||||||
|
),
|
||||||
|
1: Text('投稿',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: Theme.of(context)
|
||||||
|
.textTheme
|
||||||
|
.labelMedium!
|
||||||
|
.fontSize)),
|
||||||
|
2: Text('番剧',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: Theme.of(context)
|
||||||
|
.textTheme
|
||||||
|
.labelMedium!
|
||||||
|
.fontSize)),
|
||||||
|
3: Text('专栏',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: Theme.of(context)
|
||||||
|
.textTheme
|
||||||
|
.labelMedium!
|
||||||
|
.fontSize)),
|
||||||
|
},
|
||||||
|
padding: 13.0,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Theme.of(context)
|
||||||
|
.colorScheme
|
||||||
|
.surfaceVariant
|
||||||
|
.withOpacity(0.7),
|
||||||
|
borderRadius: BorderRadius.circular(20),
|
||||||
),
|
),
|
||||||
1: Text('投稿',
|
thumbDecoration: BoxDecoration(
|
||||||
style: TextStyle(
|
color:
|
||||||
fontSize: Theme.of(context)
|
Theme.of(context).colorScheme.background,
|
||||||
.textTheme
|
borderRadius: BorderRadius.circular(20),
|
||||||
.labelMedium!
|
),
|
||||||
.fontSize)),
|
duration: const Duration(milliseconds: 300),
|
||||||
2: Text('番剧',
|
curve: Curves.easeInOut,
|
||||||
style: TextStyle(
|
onValueChanged: (v) {
|
||||||
fontSize: Theme.of(context)
|
feedBack();
|
||||||
.textTheme
|
_dynamicsController.onSelectType(v);
|
||||||
.labelMedium!
|
},
|
||||||
.fontSize)),
|
|
||||||
3: Text('专栏',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: Theme.of(context)
|
|
||||||
.textTheme
|
|
||||||
.labelMedium!
|
|
||||||
.fontSize)),
|
|
||||||
},
|
|
||||||
padding: 13.0,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Theme.of(context)
|
|
||||||
.colorScheme
|
|
||||||
.surfaceVariant
|
|
||||||
.withOpacity(0.7),
|
|
||||||
borderRadius: BorderRadius.circular(20),
|
|
||||||
),
|
),
|
||||||
thumbDecoration: BoxDecoration(
|
|
||||||
color: Theme.of(context).colorScheme.background,
|
|
||||||
borderRadius: BorderRadius.circular(20),
|
|
||||||
),
|
|
||||||
duration: const Duration(milliseconds: 300),
|
|
||||||
curve: Curves.easeInOut,
|
|
||||||
onValueChanged: (v) {
|
|
||||||
feedBack();
|
|
||||||
_dynamicsController.onSelectType(v);
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: Text('动态',
|
: Text('动态',
|
||||||
|
|||||||
Reference in New Issue
Block a user