Merge branch 'design'

This commit is contained in:
guozhigq
2024-06-08 00:43:45 +08:00
20 changed files with 35 additions and 33 deletions

View File

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

View File

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

View File

@ -14,7 +14,7 @@ class StatDanMu extends StatelessWidget {
Map<String, Color> colorObject = { Map<String, Color> colorObject = {
'white': Colors.white, 'white': Colors.white,
'gray': Theme.of(context).colorScheme.outline, '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]!; Color color = colorObject[theme]!;
return Row( return Row(

View File

@ -14,7 +14,7 @@ class StatView extends StatelessWidget {
Map<String, Color> colorObject = { Map<String, Color> colorObject = {
'white': Colors.white, 'white': Colors.white,
'gray': Theme.of(context).colorScheme.outline, '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]!; Color color = colorObject[theme]!;
return Row( return Row(

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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