mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: video: charged badge
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -42,15 +42,16 @@ class PBadge extends StatelessWidget {
|
|||||||
if (type == 'gray') {
|
if (type == 'gray') {
|
||||||
bgColor = Colors.black54.withOpacity(0.4);
|
bgColor = Colors.black54.withOpacity(0.4);
|
||||||
color = Colors.white;
|
color = Colors.white;
|
||||||
}
|
} else if (type == 'color') {
|
||||||
if (type == 'color') {
|
|
||||||
bgColor = t.secondaryContainer.withOpacity(0.5);
|
bgColor = t.secondaryContainer.withOpacity(0.5);
|
||||||
color = t.onSecondaryContainer;
|
color = t.onSecondaryContainer;
|
||||||
}
|
} else if (type == 'line') {
|
||||||
if (type == 'line') {
|
|
||||||
bgColor = Colors.transparent;
|
bgColor = Colors.transparent;
|
||||||
color = t.primary;
|
color = t.primary;
|
||||||
borderColor = t.primary;
|
borderColor = t.primary;
|
||||||
|
} else if (type == 'error') {
|
||||||
|
bgColor = t.error;
|
||||||
|
color = t.onError;
|
||||||
}
|
}
|
||||||
|
|
||||||
EdgeInsets paddingStyle =
|
EdgeInsets paddingStyle =
|
||||||
|
|||||||
@@ -110,6 +110,9 @@ class VideoCardHMemberVideo extends StatelessWidget {
|
|||||||
.join('|'),
|
.join('|'),
|
||||||
right: 6.0,
|
right: 6.0,
|
||||||
top: 6.0,
|
top: 6.0,
|
||||||
|
type: videoItem.badges!.first.text == '充电专属'
|
||||||
|
? 'error'
|
||||||
|
: 'primary',
|
||||||
),
|
),
|
||||||
if (videoItem.history != null) ...[
|
if (videoItem.history != null) ...[
|
||||||
Builder(builder: (context) {
|
Builder(builder: (context) {
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ Widget videoSeasonWidget(item, context, type, {floor = 1}) {
|
|||||||
right: 10.0,
|
right: 10.0,
|
||||||
bottom: null,
|
bottom: null,
|
||||||
left: null,
|
left: null,
|
||||||
|
type: content.badge['text'] == '充电专属' ? 'error' : 'primary',
|
||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
left: 0,
|
left: 0,
|
||||||
|
|||||||
@@ -43,29 +43,33 @@ class _MemberContributeState extends State<MemberContribute>
|
|||||||
return _controller.tabs != null
|
return _controller.tabs != null
|
||||||
? Column(
|
? Column(
|
||||||
children: [
|
children: [
|
||||||
TabBar(
|
SizedBox(
|
||||||
overlayColor: WidgetStateProperty.all(Colors.transparent),
|
width: double.infinity,
|
||||||
splashFactory: NoSplash.splashFactory,
|
child: TabBar(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
overlayColor: WidgetStateProperty.all(Colors.transparent),
|
||||||
isScrollable: true,
|
splashFactory: NoSplash.splashFactory,
|
||||||
tabs: _controller.tabs!,
|
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||||
tabAlignment: TabAlignment.start,
|
isScrollable: true,
|
||||||
controller: _controller.tabController,
|
tabs: _controller.tabs!,
|
||||||
dividerHeight: 0,
|
tabAlignment: TabAlignment.start,
|
||||||
indicatorWeight: 0,
|
controller: _controller.tabController,
|
||||||
indicatorPadding:
|
dividerHeight: 0,
|
||||||
const EdgeInsets.symmetric(horizontal: 3, vertical: 8),
|
indicatorWeight: 0,
|
||||||
indicator: BoxDecoration(
|
indicatorPadding:
|
||||||
color: Theme.of(context).colorScheme.secondaryContainer,
|
const EdgeInsets.symmetric(horizontal: 3, vertical: 8),
|
||||||
borderRadius: BorderRadius.circular(20),
|
indicator: BoxDecoration(
|
||||||
|
color: Theme.of(context).colorScheme.secondaryContainer,
|
||||||
|
borderRadius: BorderRadius.circular(20),
|
||||||
|
),
|
||||||
|
indicatorSize: TabBarIndicatorSize.tab,
|
||||||
|
labelStyle: TabBarTheme.of(context)
|
||||||
|
.labelStyle
|
||||||
|
?.copyWith(fontSize: 14) ??
|
||||||
|
const TextStyle(fontSize: 14),
|
||||||
|
labelColor:
|
||||||
|
Theme.of(context).colorScheme.onSecondaryContainer,
|
||||||
|
unselectedLabelColor: Theme.of(context).colorScheme.outline,
|
||||||
),
|
),
|
||||||
indicatorSize: TabBarIndicatorSize.tab,
|
|
||||||
labelStyle: TabBarTheme.of(context)
|
|
||||||
.labelStyle
|
|
||||||
?.copyWith(fontSize: 14) ??
|
|
||||||
const TextStyle(fontSize: 14),
|
|
||||||
labelColor: Theme.of(context).colorScheme.onSecondaryContainer,
|
|
||||||
unselectedLabelColor: Theme.of(context).colorScheme.outline,
|
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: TabBarView(
|
child: TabBarView(
|
||||||
|
|||||||
Reference in New Issue
Block a user