mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-27 05:45:51 +08:00
opt: get theme color
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -120,6 +120,7 @@ class _LivePageState extends CommonPageState<LivePage, LiveController>
|
||||
}
|
||||
|
||||
Widget _buildFollowList() {
|
||||
final theme = Theme.of(context);
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -135,14 +136,14 @@ class _LivePageState extends CommonPageState<LivePage, LiveController>
|
||||
text: '${controller.liveCount.value}',
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
color: theme.colorScheme.primary,
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: '人正在直播',
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
color: Theme.of(context).colorScheme.outline,
|
||||
color: theme.colorScheme.outline,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -160,25 +161,25 @@ class _LivePageState extends CommonPageState<LivePage, LiveController>
|
||||
Text(
|
||||
'查看更多',
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).colorScheme.outline,
|
||||
color: theme.colorScheme.outline,
|
||||
),
|
||||
),
|
||||
Icon(
|
||||
size: 20,
|
||||
Icons.keyboard_arrow_right_outlined,
|
||||
color: Theme.of(context).colorScheme.outline,
|
||||
color: theme.colorScheme.outline,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Obx(() => _buildFollowBody(controller.followListState.value)),
|
||||
Obx(() => _buildFollowBody(theme, controller.followListState.value)),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildFollowBody(LoadingState loadingState) {
|
||||
Widget _buildFollowBody(ThemeData theme, LoadingState loadingState) {
|
||||
return switch (loadingState) {
|
||||
Loading() => SizedBox(
|
||||
height: 80,
|
||||
@@ -223,7 +224,7 @@ class _LivePageState extends CommonPageState<LivePage, LiveController>
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
width: 1.5,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
color: theme.colorScheme.primary,
|
||||
strokeAlign: BorderSide.strokeAlignOutside,
|
||||
),
|
||||
shape: BoxShape.circle,
|
||||
|
||||
@@ -26,7 +26,6 @@ class LiveCardV extends StatelessWidget {
|
||||
Get.toNamed('/liveRoom?roomid=${liveItem.roomId}');
|
||||
},
|
||||
onLongPress: () => imageSaveDialog(
|
||||
context: context,
|
||||
title: liveItem.title,
|
||||
cover: liveItem.cover,
|
||||
),
|
||||
@@ -72,6 +71,7 @@ class LiveCardV extends StatelessWidget {
|
||||
}
|
||||
|
||||
Widget liveContent(context) {
|
||||
final theme = Theme.of(context);
|
||||
return Expanded(
|
||||
flex: 1,
|
||||
child: Padding(
|
||||
@@ -96,9 +96,8 @@ class LiveCardV extends StatelessWidget {
|
||||
'${liveItem.uname}',
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(
|
||||
fontSize:
|
||||
Theme.of(context).textTheme.labelMedium!.fontSize,
|
||||
color: Theme.of(context).colorScheme.outline,
|
||||
fontSize: theme.textTheme.labelMedium!.fontSize,
|
||||
color: theme.colorScheme.outline,
|
||||
),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
|
||||
@@ -26,7 +26,6 @@ class LiveCardVFollow extends StatelessWidget {
|
||||
Get.toNamed('/liveRoom?roomid=${liveItem.roomId}');
|
||||
},
|
||||
onLongPress: () => imageSaveDialog(
|
||||
context: context,
|
||||
title: liveItem.title,
|
||||
cover: liveItem.roomCover,
|
||||
),
|
||||
@@ -72,6 +71,7 @@ class LiveCardVFollow extends StatelessWidget {
|
||||
}
|
||||
|
||||
Widget liveContent(context) {
|
||||
final theme = Theme.of(context);
|
||||
return Expanded(
|
||||
flex: 1,
|
||||
child: Padding(
|
||||
@@ -96,9 +96,8 @@ class LiveCardVFollow extends StatelessWidget {
|
||||
'${liveItem.uname}',
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(
|
||||
fontSize:
|
||||
Theme.of(context).textTheme.labelMedium!.fontSize,
|
||||
color: Theme.of(context).colorScheme.outline,
|
||||
fontSize: theme.textTheme.labelMedium!.fontSize,
|
||||
color: theme.colorScheme.outline,
|
||||
),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
|
||||
Reference in New Issue
Block a user