upgrade: color

This commit is contained in:
guozhigq
2024-06-04 23:59:23 +08:00
parent 34a6e1f79f
commit 41e491daef
20 changed files with 35 additions and 33 deletions

View File

@ -124,7 +124,7 @@ class EpisodeBottomSheet {
});
return Container(
height: sheetHeight,
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
child: Column(
children: [
buildTitle(),

View File

@ -13,8 +13,8 @@ class Skeleton extends StatelessWidget {
var shimmerGradient = LinearGradient(
colors: [
Colors.transparent,
Theme.of(context).colorScheme.background.withAlpha(10),
Theme.of(context).colorScheme.background.withAlpha(10),
Theme.of(context).colorScheme.surface.withAlpha(10),
Theme.of(context).colorScheme.surface.withAlpha(10),
Colors.transparent,
],
stops: const [

View File

@ -14,7 +14,7 @@ class StatDanMu extends StatelessWidget {
Map<String, Color> colorObject = {
'white': Colors.white,
'gray': Theme.of(context).colorScheme.outline,
'black': Theme.of(context).colorScheme.onBackground.withOpacity(0.8),
'black': Theme.of(context).colorScheme.onSurface.withOpacity(0.8),
};
Color color = colorObject[theme]!;
return Row(

View File

@ -14,7 +14,7 @@ class StatView extends StatelessWidget {
Map<String, Color> colorObject = {
'white': Colors.white,
'gray': Theme.of(context).colorScheme.outline,
'black': Theme.of(context).colorScheme.onBackground.withOpacity(0.8),
'black': Theme.of(context).colorScheme.onSurface.withOpacity(0.8),
};
Color color = colorObject[theme]!;
return Row(

View File

@ -20,10 +20,10 @@ class IntroDetail extends StatelessWidget {
sheetHeight = localCache.get('sheetHeight');
TextStyle smallTitle = TextStyle(
fontSize: 12,
color: Theme.of(context).colorScheme.onBackground,
color: Theme.of(context).colorScheme.onSurface,
);
return Container(
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
padding: const EdgeInsets.only(left: 14, right: 14),
height: sheetHeight,
child: Column(

View File

@ -162,13 +162,12 @@ class _DynamicsPageState extends State<DynamicsPage>
decoration: BoxDecoration(
color: Theme.of(context)
.colorScheme
.surfaceVariant
.surfaceContainerHighest
.withOpacity(0.7),
borderRadius: BorderRadius.circular(20),
),
thumbDecoration: BoxDecoration(
color:
Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
borderRadius: BorderRadius.circular(20),
),
duration: const Duration(milliseconds: 300),

View File

@ -19,7 +19,7 @@ Widget addWidget(item, context, type, {floor = 1}) {
};
Color bgColor = floor == 1
? Theme.of(context).dividerColor.withOpacity(0.08)
: Theme.of(context).colorScheme.background;
: Theme.of(context).colorScheme.surface;
switch (type) {
case 'ADDITIONAL_TYPE_UGC':
// 转发的投稿

View File

@ -52,7 +52,7 @@ class AuthorPanel extends StatelessWidget {
color: item.modules.moduleAuthor!.vip != null &&
item.modules.moduleAuthor!.vip['status'] > 0
? const Color.fromARGB(255, 251, 100, 163)
: Theme.of(context).colorScheme.onBackground,
: Theme.of(context).colorScheme.onSurface,
fontSize: Theme.of(context).textTheme.titleSmall!.fontSize,
),
),

View File

@ -69,7 +69,7 @@ class _UpPanelState extends State<UpPanel> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
padding: const EdgeInsets.only(left: 16, right: 16),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -95,7 +95,7 @@ class _UpPanelState extends State<UpPanel> {
),
Container(
height: 90,
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
child: Row(
children: [
Flexible(

View File

@ -18,7 +18,10 @@ class SearchText extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Material(
color: Theme.of(context).colorScheme.surfaceVariant.withOpacity(0.5),
color: Theme.of(context)
.colorScheme
.surfaceContainerHighest
.withOpacity(0.5),
borderRadius: BorderRadius.circular(6),
child: Padding(
padding: EdgeInsets.zero,

View File

@ -66,7 +66,7 @@ class _FontSizeSelectPageState extends State<FontSizeSelectPage> {
.colorScheme
.primary
.withOpacity(0.3))),
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
),
child: Row(
children: [

View File

@ -29,7 +29,7 @@ class _FavPanelState extends State<FavPanel> {
Widget build(BuildContext context) {
return Container(
height: sheetHeight,
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
child: Column(
children: [
AppBar(

View File

@ -57,7 +57,7 @@ class _GroupPanelState extends State<GroupPanel> {
Widget build(BuildContext context) {
return Container(
height: sheetHeight,
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
child: Column(
children: <Widget>[
AppBar(

View File

@ -12,7 +12,7 @@ class MenuRow extends StatelessWidget {
Widget build(BuildContext context) {
return Container(
width: double.infinity,
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
padding: const EdgeInsets.only(top: 9, bottom: 9, left: 12),
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
@ -84,7 +84,7 @@ class MenuRow extends StatelessWidget {
style: TextStyle(
fontSize: 13,
color: selectStatus
? Theme.of(context).colorScheme.onBackground
? Theme.of(context).colorScheme.onSurface
: Theme.of(context).colorScheme.outline),
),
),

View File

@ -170,7 +170,7 @@ class _VideoReplyNewDialogState extends State<VideoReplyNewDialog>
topLeft: Radius.circular(12),
topRight: Radius.circular(12),
),
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
),
child: Column(
mainAxisSize: MainAxisSize.min,

View File

@ -78,7 +78,7 @@ class _VideoReplyReplyPanelState extends State<VideoReplyReplyPanel> {
Widget build(BuildContext context) {
return Container(
height: widget.source == 'videoDetail' ? widget.sheetHeight : null,
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
child: Column(
children: [
if (widget.source == 'videoDetail')

View File

@ -23,7 +23,7 @@ class AiDetail extends StatelessWidget {
Widget build(BuildContext context) {
sheetHeight = localCache.get('sheetHeight');
return Container(
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
padding: const EdgeInsets.only(left: 14, right: 14),
height: sheetHeight,
child: Column(

View File

@ -29,7 +29,7 @@ class ScrollAppBar extends StatelessWidget {
opacity: scrollDistance / (videoHeight - kToolbarHeight),
child: Container(
height: statusBarHeight + kToolbarHeight,
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
padding: EdgeInsets.only(top: statusBarHeight),
child: AppBar(
primary: false,

View File

@ -93,7 +93,7 @@ class _HeaderControlState extends State<HeaderControl> {
height: 460,
clipBehavior: Clip.hardEdge,
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
borderRadius: const BorderRadius.all(Radius.circular(12)),
),
margin: const EdgeInsets.all(12),
@ -317,7 +317,7 @@ class _HeaderControlState extends State<HeaderControl> {
height: 500,
clipBehavior: Clip.hardEdge,
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
borderRadius: const BorderRadius.all(Radius.circular(12)),
),
margin: const EdgeInsets.all(12),
@ -377,7 +377,7 @@ class _HeaderControlState extends State<HeaderControl> {
inactiveThumbColor:
Theme.of(context).colorScheme.primaryContainer,
inactiveTrackColor:
Theme.of(context).colorScheme.background,
Theme.of(context).colorScheme.surface,
splashRadius: 10.0,
// boolean variable value
value: shutdownTimerService.waitForPlayingCompleted,
@ -570,7 +570,7 @@ class _HeaderControlState extends State<HeaderControl> {
height: 310,
clipBehavior: Clip.hardEdge,
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
borderRadius: const BorderRadius.all(Radius.circular(12)),
),
margin: const EdgeInsets.all(12),
@ -660,7 +660,7 @@ class _HeaderControlState extends State<HeaderControl> {
height: 250,
clipBehavior: Clip.hardEdge,
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
borderRadius: const BorderRadius.all(Radius.circular(12)),
),
margin: const EdgeInsets.all(12),
@ -734,7 +734,7 @@ class _HeaderControlState extends State<HeaderControl> {
height: 250,
clipBehavior: Clip.hardEdge,
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
borderRadius: const BorderRadius.all(Radius.circular(12)),
),
margin: const EdgeInsets.all(12),
@ -828,7 +828,7 @@ class _HeaderControlState extends State<HeaderControl> {
height: 580,
clipBehavior: Clip.hardEdge,
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
borderRadius: const BorderRadius.all(Radius.circular(12)),
),
margin: const EdgeInsets.all(12),
@ -1084,7 +1084,7 @@ class _HeaderControlState extends State<HeaderControl> {
height: 250,
clipBehavior: Clip.hardEdge,
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
borderRadius: const BorderRadius.all(Radius.circular(12)),
),
margin: const EdgeInsets.all(12),

View File

@ -12,7 +12,7 @@ Future imageSaveDialog(context, videoItem, closeFn) {
builder: (context) => Container(
margin: const EdgeInsets.symmetric(horizontal: StyleString.safeSpace),
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.background,
color: Theme.of(context).colorScheme.surface,
borderRadius: BorderRadius.circular(10.0),
),
child: Column(