Skip to content

Commit

Permalink
Merge branch 'design'
Browse files Browse the repository at this point in the history
  • Loading branch information
guozhigq committed Jan 2, 2024
2 parents b3f4181 + 65ab59f commit 69b2a76
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 21 deletions.
8 changes: 8 additions & 0 deletions lib/common/widgets/video_card_v.dart
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,14 @@ class VideoContent extends StatelessWidget {
fs: 9,
)
],
if (videoItem.isFollowed == 1) ...[
const PBadge(
text: '已关注',
stack: 'normal',
size: 'small',
type: 'color',
)
],
Expanded(
flex: crossAxisCount == 1 ? 0 : 1,
child: Text(
Expand Down
60 changes: 39 additions & 21 deletions lib/pages/setting/play_setting.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'dart:io';

import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:hive/hive.dart';
Expand Down Expand Up @@ -95,12 +97,13 @@ class _PlaySettingState extends State<PlaySetting> {
setKey: SettingBoxKey.enableBackgroundPlay,
defaultVal: false,
),
const SetSwitchItem(
title: '自动PiP播放',
subTitle: '进入后台时画中画播放',
setKey: SettingBoxKey.autoPiP,
defaultVal: false,
),
if (Platform.isAndroid)
const SetSwitchItem(
title: '自动PiP播放',
subTitle: '进入后台时画中画播放',
setKey: SettingBoxKey.autoPiP,
defaultVal: false,
),
const SetSwitchItem(
title: '自动全屏',
subTitle: '视频开始播放时进入全屏',
Expand Down Expand Up @@ -154,9 +157,12 @@ class _PlaySettingState extends State<PlaySetting> {
int? result = await showDialog(
context: context,
builder: (context) {
return SelectDialog<int>(title: '默认画质', value: defaultVideoQa, values: VideoQuality.values.reversed.map((e) {
return {'title': e.description, 'value': e.code};
}).toList());
return SelectDialog<int>(
title: '默认画质',
value: defaultVideoQa,
values: VideoQuality.values.reversed.map((e) {
return {'title': e.description, 'value': e.code};
}).toList());
},
);
if (result != null) {
Expand All @@ -177,9 +183,12 @@ class _PlaySettingState extends State<PlaySetting> {
int? result = await showDialog(
context: context,
builder: (context) {
return SelectDialog<int>(title: '默认音质', value: defaultAudioQa, values: AudioQuality.values.reversed.map((e) {
return {'title': e.description, 'value': e.code};
}).toList());
return SelectDialog<int>(
title: '默认音质',
value: defaultAudioQa,
values: AudioQuality.values.reversed.map((e) {
return {'title': e.description, 'value': e.code};
}).toList());
},
);
if (result != null) {
Expand All @@ -200,9 +209,12 @@ class _PlaySettingState extends State<PlaySetting> {
String? result = await showDialog(
context: context,
builder: (context) {
return SelectDialog<String>(title: '默认解码格式', value: defaultDecode, values: VideoDecodeFormats.values.map((e) {
return {'title': e.description, 'value': e.code};
}).toList());
return SelectDialog<String>(
title: '默认解码格式',
value: defaultDecode,
values: VideoDecodeFormats.values.map((e) {
return {'title': e.description, 'value': e.code};
}).toList());
},
);
if (result != null) {
Expand All @@ -223,9 +235,12 @@ class _PlaySettingState extends State<PlaySetting> {
int? result = await showDialog(
context: context,
builder: (context) {
return SelectDialog<int>(title: '默认全屏方式', value: defaultFullScreenMode, values: FullScreenMode.values.map((e) {
return {'title': e.description, 'value': e.code};
}).toList());
return SelectDialog<int>(
title: '默认全屏方式',
value: defaultFullScreenMode,
values: FullScreenMode.values.map((e) {
return {'title': e.description, 'value': e.code};
}).toList());
},
);
if (result != null) {
Expand All @@ -246,9 +261,12 @@ class _PlaySettingState extends State<PlaySetting> {
int? result = await showDialog(
context: context,
builder: (context) {
return SelectDialog<int>(title: '底部进度条展示', value: defaultBtmProgressBehavior, values: BtmProgresBehavior.values.map((e) {
return {'title': e.description, 'value': e.code};
}).toList());
return SelectDialog<int>(
title: '底部进度条展示',
value: defaultBtmProgressBehavior,
values: BtmProgresBehavior.values.map((e) {
return {'title': e.description, 'value': e.code};
}).toList());
},
);
if (result != null) {
Expand Down

0 comments on commit 69b2a76

Please sign in to comment.