mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-08-06 02:30:12 +08:00
@@ -34,45 +34,6 @@ class MainActivity : AudioServiceActivity() {
|
|||||||
when (call.method) {
|
when (call.method) {
|
||||||
"back" -> back();
|
"back" -> back();
|
||||||
|
|
||||||
"biliSendCommAntifraud" -> {
|
|
||||||
try {
|
|
||||||
val action = call.argument<Int>("action") ?: 0
|
|
||||||
val oid = call.argument<Number>("oid") ?: 0L
|
|
||||||
val type = call.argument<Int>("type") ?: 0
|
|
||||||
val rpid = call.argument<Number>("rpid") ?: 0L
|
|
||||||
val root = call.argument<Number>("root") ?: 0L
|
|
||||||
val parent = call.argument<Number>("parent") ?: 0L
|
|
||||||
val ctime = call.argument<Number>("ctime") ?: 0L
|
|
||||||
val commentText = call.argument<String>("comment_text") ?: ""
|
|
||||||
val pictures = call.argument<String?>("pictures")
|
|
||||||
val sourceId = call.argument<String>("source_id") ?: ""
|
|
||||||
val uid = call.argument<Number>("uid") ?: 0L
|
|
||||||
val cookies = call.argument<List<String>>("cookies") ?: emptyList<String>()
|
|
||||||
|
|
||||||
val intent = Intent().apply {
|
|
||||||
component = ComponentName(
|
|
||||||
"icu.freedomIntrovert.biliSendCommAntifraud",
|
|
||||||
"icu.freedomIntrovert.biliSendCommAntifraud.ByXposedLaunchedActivity"
|
|
||||||
)
|
|
||||||
putExtra("action", action)
|
|
||||||
putExtra("oid", oid.toLong())
|
|
||||||
putExtra("type", type)
|
|
||||||
putExtra("rpid", rpid.toLong())
|
|
||||||
putExtra("root", root.toLong())
|
|
||||||
putExtra("parent", parent.toLong())
|
|
||||||
putExtra("ctime", ctime.toLong())
|
|
||||||
putExtra("comment_text", commentText)
|
|
||||||
if (pictures != null)
|
|
||||||
putExtra("pictures", pictures)
|
|
||||||
putExtra("source_id", sourceId)
|
|
||||||
putExtra("uid", uid.toLong())
|
|
||||||
putStringArrayListExtra("cookies", ArrayList(cookies))
|
|
||||||
}
|
|
||||||
startActivity(intent)
|
|
||||||
} catch (_: Exception) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
"linkVerifySettings" -> {
|
"linkVerifySettings" -> {
|
||||||
val uri = ("package:" + context.packageName).toUri()
|
val uri = ("package:" + context.packageName).toUri()
|
||||||
try {
|
try {
|
||||||
@@ -131,15 +92,6 @@ class MainActivity : AudioServiceActivity() {
|
|||||||
result.success(false)
|
result.success(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
"setPipAutoEnterEnabled" -> {
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
|
||||||
val params = PictureInPictureParams.Builder()
|
|
||||||
.setAutoEnterEnabled(call.argument<Boolean>("autoEnable") ?: false)
|
|
||||||
.build()
|
|
||||||
setPictureInPictureParams(params)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
"createShortcut" -> {
|
"createShortcut" -> {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
try {
|
try {
|
||||||
@@ -189,14 +141,6 @@ class MainActivity : AudioServiceActivity() {
|
|||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
|
||||||
window.attributes.layoutInDisplayCutoutMode =
|
|
||||||
LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
stopService(Intent(this, com.ryanheise.audioservice.AudioService::class.java))
|
stopService(Intent(this, com.ryanheise.audioservice.AudioService::class.java))
|
||||||
super.onDestroy()
|
super.onDestroy()
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import 'package:PiliPlus/common/skeleton/skeleton.dart';
|
|
||||||
import 'package:PiliPlus/utils/global_data.dart';
|
import 'package:PiliPlus/utils/global_data.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
@@ -16,99 +15,97 @@ class DynamicCardSkeleton extends StatelessWidget {
|
|||||||
alpha: 0.2,
|
alpha: 0.2,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
return Skeleton(
|
return Container(
|
||||||
child: Container(
|
padding: const EdgeInsets.only(left: 12, right: 12, top: 12),
|
||||||
padding: const EdgeInsets.only(left: 12, right: 12, top: 12),
|
decoration: BoxDecoration(
|
||||||
decoration: BoxDecoration(
|
border: Border(
|
||||||
border: Border(
|
bottom: BorderSide(
|
||||||
bottom: BorderSide(
|
width: 8,
|
||||||
width: 8,
|
color: theme.dividerColor.withValues(alpha: 0.05),
|
||||||
color: theme.dividerColor.withValues(alpha: 0.05),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Column(
|
),
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
child: Column(
|
||||||
children: [
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
Row(
|
children: [
|
||||||
children: [
|
Row(
|
||||||
Container(
|
children: [
|
||||||
width: 40,
|
Container(
|
||||||
height: 40,
|
width: 40,
|
||||||
decoration: BoxDecoration(
|
height: 40,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: color,
|
||||||
|
borderRadius: const BorderRadius.all(Radius.circular(20)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 10),
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
color: color,
|
color: color,
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(20)),
|
width: 100,
|
||||||
|
height: 13,
|
||||||
|
margin: const EdgeInsets.only(bottom: 5),
|
||||||
),
|
),
|
||||||
),
|
Container(
|
||||||
const SizedBox(width: 10),
|
color: color,
|
||||||
Column(
|
width: 50,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
height: 11,
|
||||||
children: [
|
),
|
||||||
Container(
|
],
|
||||||
color: color,
|
),
|
||||||
width: 100,
|
],
|
||||||
height: 13,
|
),
|
||||||
margin: const EdgeInsets.only(bottom: 5),
|
const SizedBox(height: 10),
|
||||||
|
Container(
|
||||||
|
color: color,
|
||||||
|
width: double.infinity,
|
||||||
|
height: 13,
|
||||||
|
margin: const EdgeInsets.only(bottom: 7),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
color: color,
|
||||||
|
width: double.infinity,
|
||||||
|
height: 13,
|
||||||
|
margin: const EdgeInsets.only(bottom: 7),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
color: color,
|
||||||
|
width: 300,
|
||||||
|
height: 13,
|
||||||
|
margin: const EdgeInsets.only(bottom: 7),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
color: color,
|
||||||
|
width: 250,
|
||||||
|
height: 13,
|
||||||
|
margin: const EdgeInsets.only(bottom: 7),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
color: color,
|
||||||
|
width: 100,
|
||||||
|
height: 13,
|
||||||
|
margin: const EdgeInsets.only(bottom: 7),
|
||||||
|
),
|
||||||
|
if (GlobalData.dynamicsWaterfallFlow) const Spacer(),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
|
children: const ['转发', '评论', '点赞']
|
||||||
|
.map(
|
||||||
|
(e) => TextButton.icon(
|
||||||
|
onPressed: () {},
|
||||||
|
icon: const Icon(
|
||||||
|
Icons.radio_button_unchecked_outlined,
|
||||||
|
size: 20,
|
||||||
),
|
),
|
||||||
Container(
|
style: buttonStyle,
|
||||||
color: color,
|
label: Text(e),
|
||||||
width: 50,
|
),
|
||||||
height: 11,
|
)
|
||||||
),
|
.toList(),
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
],
|
|
||||||
),
|
|
||||||
const SizedBox(height: 10),
|
|
||||||
Container(
|
|
||||||
color: color,
|
|
||||||
width: double.infinity,
|
|
||||||
height: 13,
|
|
||||||
margin: const EdgeInsets.only(bottom: 7),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
color: color,
|
|
||||||
width: double.infinity,
|
|
||||||
height: 13,
|
|
||||||
margin: const EdgeInsets.only(bottom: 7),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
color: color,
|
|
||||||
width: 300,
|
|
||||||
height: 13,
|
|
||||||
margin: const EdgeInsets.only(bottom: 7),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
color: color,
|
|
||||||
width: 250,
|
|
||||||
height: 13,
|
|
||||||
margin: const EdgeInsets.only(bottom: 7),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
color: color,
|
|
||||||
width: 100,
|
|
||||||
height: 13,
|
|
||||||
margin: const EdgeInsets.only(bottom: 7),
|
|
||||||
),
|
|
||||||
if (GlobalData.dynamicsWaterfallFlow) const Spacer(),
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
|
||||||
children: const ['转发', '评论', '点赞']
|
|
||||||
.map(
|
|
||||||
(e) => TextButton.icon(
|
|
||||||
onPressed: () {},
|
|
||||||
icon: const Icon(
|
|
||||||
Icons.radio_button_unchecked_outlined,
|
|
||||||
size: 20,
|
|
||||||
),
|
|
||||||
style: buttonStyle,
|
|
||||||
label: Text(e),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
.toList(),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import 'package:PiliPlus/common/skeleton/skeleton.dart';
|
|
||||||
import 'package:PiliPlus/common/style.dart';
|
import 'package:PiliPlus/common/style.dart';
|
||||||
import 'package:PiliPlus/common/widgets/flutter/layout_builder.dart';
|
import 'package:PiliPlus/common/widgets/flutter/layout_builder.dart';
|
||||||
import 'package:flutter/material.dart' hide LayoutBuilder;
|
import 'package:flutter/material.dart' hide LayoutBuilder;
|
||||||
@@ -9,58 +8,56 @@ class FavPgcItemSkeleton extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final color = Theme.of(context).colorScheme.onInverseSurface;
|
final color = Theme.of(context).colorScheme.onInverseSurface;
|
||||||
return Skeleton(
|
return Padding(
|
||||||
child: Padding(
|
padding: const EdgeInsets.symmetric(
|
||||||
padding: const EdgeInsets.symmetric(
|
horizontal: Style.safeSpace,
|
||||||
horizontal: Style.safeSpace,
|
vertical: 5,
|
||||||
vertical: 5,
|
),
|
||||||
),
|
child: Row(
|
||||||
child: Row(
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
children: [
|
||||||
children: [
|
AspectRatio(
|
||||||
AspectRatio(
|
aspectRatio: 3 / 4,
|
||||||
aspectRatio: 3 / 4,
|
child: LayoutBuilder(
|
||||||
child: LayoutBuilder(
|
builder: (context, boxConstraints) {
|
||||||
builder: (context, boxConstraints) {
|
return Container(
|
||||||
return Container(
|
decoration: BoxDecoration(
|
||||||
decoration: BoxDecoration(
|
color: color,
|
||||||
color: color,
|
borderRadius: const BorderRadius.all(Radius.circular(4)),
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(4)),
|
),
|
||||||
),
|
width: boxConstraints.maxWidth,
|
||||||
width: boxConstraints.maxWidth,
|
height: boxConstraints.maxHeight,
|
||||||
height: boxConstraints.maxHeight,
|
);
|
||||||
);
|
},
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
const SizedBox(width: 10),
|
),
|
||||||
Expanded(
|
const SizedBox(width: 10),
|
||||||
child: Column(
|
Expanded(
|
||||||
mainAxisSize: MainAxisSize.min,
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
Container(
|
children: [
|
||||||
width: 175,
|
Container(
|
||||||
height: 12,
|
width: 175,
|
||||||
color: color,
|
height: 12,
|
||||||
),
|
color: color,
|
||||||
const SizedBox(height: 10),
|
),
|
||||||
Container(
|
const SizedBox(height: 10),
|
||||||
width: 55,
|
Container(
|
||||||
height: 11,
|
width: 55,
|
||||||
color: color,
|
height: 11,
|
||||||
),
|
color: color,
|
||||||
const SizedBox(height: 5),
|
),
|
||||||
Container(
|
const SizedBox(height: 5),
|
||||||
width: 35,
|
Container(
|
||||||
height: 11,
|
width: 35,
|
||||||
color: color,
|
height: 11,
|
||||||
),
|
color: color,
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import 'package:PiliPlus/common/skeleton/skeleton.dart';
|
|
||||||
import 'package:PiliPlus/common/style.dart';
|
import 'package:PiliPlus/common/style.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
@@ -13,69 +12,67 @@ class _MediaPgcSkeletonState extends State<MediaPgcSkeleton> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
Color bgColor = Theme.of(context).colorScheme.onInverseSurface;
|
Color bgColor = Theme.of(context).colorScheme.onInverseSurface;
|
||||||
return Skeleton(
|
return Padding(
|
||||||
child: Padding(
|
padding: const .symmetric(
|
||||||
padding: const .symmetric(
|
horizontal: Style.safeSpace,
|
||||||
horizontal: Style.safeSpace,
|
vertical: 7,
|
||||||
vertical: 7,
|
),
|
||||||
),
|
child: Row(
|
||||||
child: Row(
|
children: [
|
||||||
children: [
|
Container(
|
||||||
Container(
|
width: 111,
|
||||||
width: 111,
|
height: 148,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: const BorderRadius.all(Radius.circular(6)),
|
||||||
|
color: bgColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 10),
|
||||||
|
Expanded(
|
||||||
|
child: SizedBox(
|
||||||
height: 148,
|
height: 148,
|
||||||
decoration: BoxDecoration(
|
child: Column(
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(6)),
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
color: bgColor,
|
children: [
|
||||||
),
|
Container(
|
||||||
),
|
color: bgColor,
|
||||||
const SizedBox(width: 10),
|
width: 200,
|
||||||
Expanded(
|
height: 20,
|
||||||
child: SizedBox(
|
margin: const EdgeInsets.only(bottom: 15),
|
||||||
height: 148,
|
),
|
||||||
child: Column(
|
Container(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
color: bgColor,
|
||||||
children: [
|
width: 150,
|
||||||
Container(
|
height: 13,
|
||||||
color: bgColor,
|
margin: const EdgeInsets.only(bottom: 5),
|
||||||
width: 200,
|
),
|
||||||
height: 20,
|
Container(
|
||||||
margin: const EdgeInsets.only(bottom: 15),
|
color: bgColor,
|
||||||
),
|
width: 150,
|
||||||
Container(
|
height: 13,
|
||||||
color: bgColor,
|
margin: const EdgeInsets.only(bottom: 5),
|
||||||
width: 150,
|
),
|
||||||
height: 13,
|
Container(
|
||||||
margin: const EdgeInsets.only(bottom: 5),
|
color: bgColor,
|
||||||
),
|
width: 150,
|
||||||
Container(
|
height: 13,
|
||||||
color: bgColor,
|
),
|
||||||
width: 150,
|
const Spacer(),
|
||||||
height: 13,
|
Container(
|
||||||
margin: const EdgeInsets.only(bottom: 5),
|
width: 90,
|
||||||
),
|
height: 35,
|
||||||
Container(
|
decoration: BoxDecoration(
|
||||||
color: bgColor,
|
borderRadius: const BorderRadius.all(
|
||||||
width: 150,
|
Radius.circular(20),
|
||||||
height: 13,
|
|
||||||
),
|
|
||||||
const Spacer(),
|
|
||||||
Container(
|
|
||||||
width: 90,
|
|
||||||
height: 35,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: const BorderRadius.all(
|
|
||||||
Radius.circular(20),
|
|
||||||
),
|
|
||||||
color: bgColor,
|
|
||||||
),
|
),
|
||||||
|
color: bgColor,
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import 'package:PiliPlus/common/skeleton/skeleton.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class MsgFeedSysMsgSkeleton extends StatelessWidget {
|
class MsgFeedSysMsgSkeleton extends StatelessWidget {
|
||||||
@@ -7,46 +6,44 @@ class MsgFeedSysMsgSkeleton extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final color = Theme.of(context).colorScheme.onInverseSurface;
|
final color = Theme.of(context).colorScheme.onInverseSurface;
|
||||||
return Skeleton(
|
return Padding(
|
||||||
child: Padding(
|
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
|
child: Column(
|
||||||
child: Column(
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
children: [
|
||||||
children: [
|
Container(
|
||||||
Container(
|
width: 125,
|
||||||
width: 125,
|
height: 16,
|
||||||
height: 16,
|
color: color,
|
||||||
color: color,
|
),
|
||||||
),
|
const SizedBox(height: 6),
|
||||||
const SizedBox(height: 6),
|
Container(
|
||||||
Container(
|
width: double.infinity,
|
||||||
width: double.infinity,
|
height: 12,
|
||||||
height: 12,
|
color: color,
|
||||||
color: color,
|
),
|
||||||
),
|
const SizedBox(height: 4),
|
||||||
const SizedBox(height: 4),
|
Container(
|
||||||
Container(
|
width: double.infinity,
|
||||||
width: double.infinity,
|
height: 12,
|
||||||
height: 12,
|
color: color,
|
||||||
color: color,
|
),
|
||||||
),
|
const SizedBox(height: 4),
|
||||||
const SizedBox(height: 4),
|
Container(
|
||||||
Container(
|
width: 100,
|
||||||
|
height: 12,
|
||||||
|
color: color,
|
||||||
|
),
|
||||||
|
const SizedBox(height: 4),
|
||||||
|
Align(
|
||||||
|
alignment: Alignment.centerRight,
|
||||||
|
child: Container(
|
||||||
width: 100,
|
width: 100,
|
||||||
height: 12,
|
height: 10,
|
||||||
color: color,
|
color: color,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 4),
|
),
|
||||||
Align(
|
],
|
||||||
alignment: Alignment.centerRight,
|
|
||||||
child: Container(
|
|
||||||
width: 100,
|
|
||||||
height: 10,
|
|
||||||
color: color,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import 'package:PiliPlus/common/skeleton/skeleton.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class MsgFeedTopSkeleton extends StatelessWidget {
|
class MsgFeedTopSkeleton extends StatelessWidget {
|
||||||
@@ -7,30 +6,28 @@ class MsgFeedTopSkeleton extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final color = Theme.of(context).colorScheme.onInverseSurface;
|
final color = Theme.of(context).colorScheme.onInverseSurface;
|
||||||
return Skeleton(
|
return ListTile(
|
||||||
child: ListTile(
|
leading: Container(
|
||||||
leading: Container(
|
width: 45,
|
||||||
width: 45,
|
height: 45,
|
||||||
height: 45,
|
decoration: BoxDecoration(
|
||||||
decoration: BoxDecoration(
|
shape: BoxShape.circle,
|
||||||
shape: BoxShape.circle,
|
|
||||||
color: color,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
title: UnconstrainedBox(
|
|
||||||
alignment: Alignment.centerLeft,
|
|
||||||
child: Container(
|
|
||||||
width: 100,
|
|
||||||
height: 11,
|
|
||||||
color: color,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
subtitle: Container(
|
|
||||||
color: color,
|
color: color,
|
||||||
width: 125,
|
|
||||||
height: 11,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
title: UnconstrainedBox(
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: Container(
|
||||||
|
width: 100,
|
||||||
|
height: 11,
|
||||||
|
color: color,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
subtitle: Container(
|
||||||
|
color: color,
|
||||||
|
width: 125,
|
||||||
|
height: 11,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,65 +0,0 @@
|
|||||||
import 'dart:ui' as ui;
|
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
class Skeleton extends StatefulWidget {
|
|
||||||
final Widget child;
|
|
||||||
|
|
||||||
const Skeleton({super.key, required this.child});
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<Skeleton> createState() => _SkeletonState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _SkeletonState extends State<Skeleton>
|
|
||||||
with SingleTickerProviderStateMixin {
|
|
||||||
late final AnimationController _controller;
|
|
||||||
late Color color;
|
|
||||||
final matrix = Matrix4.identity();
|
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
super.initState();
|
|
||||||
_controller = AnimationController.unbounded(vsync: this)
|
|
||||||
..repeat(min: -0.5, max: 1.5, period: const Duration(milliseconds: 1000))
|
|
||||||
..addListener(_setState);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
_controller.dispose();
|
|
||||||
super.dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
void _setState() {
|
|
||||||
setState(() {});
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void didChangeDependencies() {
|
|
||||||
super.didChangeDependencies();
|
|
||||||
color = ColorScheme.of(context).surface.withAlpha(10);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
final colors = [Colors.transparent, color, color, Colors.transparent];
|
|
||||||
return ShaderMask(
|
|
||||||
blendMode: BlendMode.srcATop,
|
|
||||||
shaderCallback: (Rect bounds) {
|
|
||||||
final width = bounds.width;
|
|
||||||
final height = bounds.height;
|
|
||||||
matrix[12] = width * _controller.value;
|
|
||||||
return ui.Gradient.linear(
|
|
||||||
Offset(0, 0.35 * height),
|
|
||||||
Offset(width, 0.95 * height),
|
|
||||||
colors,
|
|
||||||
const [0.1, 0.3, 0.5, 0.7],
|
|
||||||
TileMode.clamp,
|
|
||||||
matrix.storage,
|
|
||||||
);
|
|
||||||
},
|
|
||||||
child: widget.child,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
import 'package:PiliPlus/common/skeleton/skeleton.dart';
|
|
||||||
import 'package:PiliPlus/common/widgets/flutter/layout_builder.dart';
|
import 'package:PiliPlus/common/widgets/flutter/layout_builder.dart';
|
||||||
import 'package:PiliPlus/utils/utils.dart';
|
import 'package:PiliPlus/utils/utils.dart';
|
||||||
import 'package:flutter/material.dart' hide LayoutBuilder;
|
import 'package:flutter/material.dart' hide LayoutBuilder;
|
||||||
@@ -9,43 +8,41 @@ class SpaceOpusSkeleton extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final surface = Theme.of(context).colorScheme.onInverseSurface;
|
final surface = Theme.of(context).colorScheme.onInverseSurface;
|
||||||
return Skeleton(
|
return Card(
|
||||||
child: Card(
|
clipBehavior: Clip.hardEdge,
|
||||||
clipBehavior: Clip.hardEdge,
|
shape: const RoundedRectangleBorder(
|
||||||
shape: const RoundedRectangleBorder(
|
borderRadius: BorderRadius.all(Radius.circular(6)),
|
||||||
borderRadius: BorderRadius.all(Radius.circular(6)),
|
),
|
||||||
),
|
child: LayoutBuilder(
|
||||||
child: LayoutBuilder(
|
builder: (context, constraints) {
|
||||||
builder: (context, constraints) {
|
return Column(
|
||||||
return Column(
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
children: [
|
||||||
children: [
|
Container(
|
||||||
Container(
|
height:
|
||||||
height:
|
(0.68 + 0.82 * Utils.random.nextDouble()) *
|
||||||
(0.68 + 0.82 * Utils.random.nextDouble()) *
|
constraints.maxWidth,
|
||||||
constraints.maxWidth,
|
color: surface,
|
||||||
color: surface,
|
),
|
||||||
|
Container(
|
||||||
|
height: 10,
|
||||||
|
color: surface,
|
||||||
|
margin: const EdgeInsets.all(10),
|
||||||
|
width: constraints.maxWidth * 0.7,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: 10,
|
||||||
|
color: surface,
|
||||||
|
margin: const EdgeInsets.only(
|
||||||
|
left: 10,
|
||||||
|
right: 10,
|
||||||
|
bottom: 10,
|
||||||
),
|
),
|
||||||
Container(
|
width: constraints.maxWidth,
|
||||||
height: 10,
|
),
|
||||||
color: surface,
|
],
|
||||||
margin: const EdgeInsets.all(10),
|
);
|
||||||
width: constraints.maxWidth * 0.7,
|
},
|
||||||
),
|
|
||||||
Container(
|
|
||||||
height: 10,
|
|
||||||
color: surface,
|
|
||||||
margin: const EdgeInsets.only(
|
|
||||||
left: 10,
|
|
||||||
right: 10,
|
|
||||||
bottom: 10,
|
|
||||||
),
|
|
||||||
width: constraints.maxWidth,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import 'package:PiliPlus/common/skeleton/skeleton.dart';
|
|
||||||
import 'package:PiliPlus/common/style.dart';
|
import 'package:PiliPlus/common/style.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
@@ -8,69 +7,67 @@ class VideoCardHSkeleton extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final color = Theme.of(context).colorScheme.onInverseSurface;
|
final color = Theme.of(context).colorScheme.onInverseSurface;
|
||||||
return Skeleton(
|
return Padding(
|
||||||
child: Padding(
|
padding: const .symmetric(
|
||||||
padding: const .symmetric(
|
horizontal: Style.safeSpace,
|
||||||
horizontal: Style.safeSpace,
|
vertical: 5,
|
||||||
vertical: 5,
|
),
|
||||||
),
|
child: Row(
|
||||||
child: Row(
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
children: [
|
||||||
children: [
|
AspectRatio(
|
||||||
AspectRatio(
|
aspectRatio: Style.aspectRatio,
|
||||||
aspectRatio: Style.aspectRatio,
|
child: DecoratedBox(
|
||||||
child: DecoratedBox(
|
decoration: BoxDecoration(
|
||||||
decoration: BoxDecoration(
|
color: color,
|
||||||
color: color,
|
borderRadius: Style.mdRadius,
|
||||||
borderRadius: Style.mdRadius,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
),
|
||||||
child: Padding(
|
Expanded(
|
||||||
padding: const .fromLTRB(10, 4, 6, 4),
|
child: Padding(
|
||||||
child: Column(
|
padding: const .fromLTRB(10, 4, 6, 4),
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
child: Column(
|
||||||
children: [
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
Container(
|
children: [
|
||||||
color: color,
|
Container(
|
||||||
width: 200,
|
color: color,
|
||||||
height: 11,
|
width: 200,
|
||||||
margin: const EdgeInsets.only(bottom: 5),
|
height: 11,
|
||||||
),
|
margin: const EdgeInsets.only(bottom: 5),
|
||||||
Container(
|
),
|
||||||
color: color,
|
Container(
|
||||||
width: 150,
|
color: color,
|
||||||
height: 13,
|
width: 150,
|
||||||
),
|
height: 13,
|
||||||
const Spacer(),
|
),
|
||||||
Container(
|
const Spacer(),
|
||||||
color: color,
|
Container(
|
||||||
width: 100,
|
color: color,
|
||||||
height: 13,
|
width: 100,
|
||||||
margin: const EdgeInsets.only(bottom: 5),
|
height: 13,
|
||||||
),
|
margin: const EdgeInsets.only(bottom: 5),
|
||||||
Row(
|
),
|
||||||
children: [
|
Row(
|
||||||
Container(
|
children: [
|
||||||
color: color,
|
Container(
|
||||||
width: 40,
|
color: color,
|
||||||
height: 13,
|
width: 40,
|
||||||
margin: const EdgeInsets.only(right: 8),
|
height: 13,
|
||||||
),
|
margin: const EdgeInsets.only(right: 8),
|
||||||
Container(
|
),
|
||||||
color: color,
|
Container(
|
||||||
width: 40,
|
color: color,
|
||||||
height: 13,
|
width: 40,
|
||||||
),
|
height: 13,
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import 'package:PiliPlus/common/skeleton/skeleton.dart';
|
|
||||||
import 'package:PiliPlus/common/style.dart';
|
import 'package:PiliPlus/common/style.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
@@ -8,57 +7,55 @@ class VideoCardVSkeleton extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final color = Theme.of(context).colorScheme.onInverseSurface;
|
final color = Theme.of(context).colorScheme.onInverseSurface;
|
||||||
return Skeleton(
|
return Column(
|
||||||
child: Column(
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
children: [
|
||||||
children: [
|
AspectRatio(
|
||||||
AspectRatio(
|
aspectRatio: Style.aspectRatio,
|
||||||
aspectRatio: Style.aspectRatio,
|
child: DecoratedBox(
|
||||||
child: DecoratedBox(
|
decoration: BoxDecoration(
|
||||||
decoration: BoxDecoration(
|
color: color,
|
||||||
|
borderRadius: Style.mdRadius,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
// 多列
|
||||||
|
padding: const EdgeInsets.fromLTRB(4, 5, 6, 6),
|
||||||
|
// 单列
|
||||||
|
// padding: const EdgeInsets.fromLTRB(14, 10, 4, 8),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
// const SizedBox(height: 6),
|
||||||
|
Container(
|
||||||
|
width: 200,
|
||||||
|
height: 13,
|
||||||
|
margin: const EdgeInsets.only(bottom: 5),
|
||||||
color: color,
|
color: color,
|
||||||
borderRadius: Style.mdRadius,
|
|
||||||
),
|
),
|
||||||
),
|
Container(
|
||||||
|
width: 150,
|
||||||
|
height: 13,
|
||||||
|
margin: const EdgeInsets.only(bottom: 12),
|
||||||
|
color: color,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: 110,
|
||||||
|
height: 13,
|
||||||
|
margin: const EdgeInsets.only(bottom: 5),
|
||||||
|
color: color,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: 75,
|
||||||
|
height: 13,
|
||||||
|
color: color,
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
Padding(
|
),
|
||||||
// 多列
|
],
|
||||||
padding: const EdgeInsets.fromLTRB(4, 5, 6, 6),
|
|
||||||
// 单列
|
|
||||||
// padding: const EdgeInsets.fromLTRB(14, 10, 4, 8),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
// const SizedBox(height: 6),
|
|
||||||
Container(
|
|
||||||
width: 200,
|
|
||||||
height: 13,
|
|
||||||
margin: const EdgeInsets.only(bottom: 5),
|
|
||||||
color: color,
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
width: 150,
|
|
||||||
height: 13,
|
|
||||||
margin: const EdgeInsets.only(bottom: 12),
|
|
||||||
color: color,
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
width: 110,
|
|
||||||
height: 13,
|
|
||||||
margin: const EdgeInsets.only(bottom: 5),
|
|
||||||
color: color,
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
width: 75,
|
|
||||||
height: 13,
|
|
||||||
color: color,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import 'package:PiliPlus/common/skeleton/skeleton.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class VideoReplySkeleton extends StatelessWidget {
|
class VideoReplySkeleton extends StatelessWidget {
|
||||||
@@ -7,81 +6,79 @@ class VideoReplySkeleton extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
Color bgColor = Theme.of(context).colorScheme.onInverseSurface;
|
Color bgColor = Theme.of(context).colorScheme.onInverseSurface;
|
||||||
return Skeleton(
|
return Column(
|
||||||
child: Column(
|
children: [
|
||||||
children: [
|
Padding(
|
||||||
Padding(
|
padding: const EdgeInsets.fromLTRB(12, 8, 8, 2),
|
||||||
padding: const EdgeInsets.fromLTRB(12, 8, 8, 2),
|
child: Row(
|
||||||
child: Row(
|
children: [
|
||||||
children: [
|
ClipOval(
|
||||||
ClipOval(
|
child: Container(
|
||||||
child: Container(
|
width: 34,
|
||||||
width: 34,
|
height: 34,
|
||||||
height: 34,
|
color: bgColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 12),
|
||||||
|
Container(
|
||||||
|
width: 80,
|
||||||
|
height: 13,
|
||||||
|
color: bgColor,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(
|
||||||
|
top: 4,
|
||||||
|
left: 57,
|
||||||
|
right: 6,
|
||||||
|
bottom: 6,
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: 300,
|
||||||
|
height: 14,
|
||||||
|
margin: const EdgeInsets.only(bottom: 4),
|
||||||
|
color: bgColor,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: 180,
|
||||||
|
height: 14,
|
||||||
|
margin: const EdgeInsets.only(bottom: 10),
|
||||||
|
color: bgColor,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: 40,
|
||||||
|
height: 14,
|
||||||
|
margin: const EdgeInsets.only(bottom: 4),
|
||||||
color: bgColor,
|
color: bgColor,
|
||||||
),
|
),
|
||||||
),
|
const Spacer(),
|
||||||
const SizedBox(width: 12),
|
Container(
|
||||||
Container(
|
width: 30,
|
||||||
width: 80,
|
height: 14,
|
||||||
height: 13,
|
margin: const EdgeInsets.only(bottom: 4),
|
||||||
color: bgColor,
|
color: bgColor,
|
||||||
),
|
),
|
||||||
],
|
const SizedBox(width: 8),
|
||||||
),
|
Container(
|
||||||
|
width: 30,
|
||||||
|
height: 14,
|
||||||
|
margin: const EdgeInsets.only(bottom: 4),
|
||||||
|
color: bgColor,
|
||||||
|
),
|
||||||
|
const SizedBox(width: 8),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
Padding(
|
),
|
||||||
padding: const EdgeInsets.only(
|
],
|
||||||
top: 4,
|
|
||||||
left: 57,
|
|
||||||
right: 6,
|
|
||||||
bottom: 6,
|
|
||||||
),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
width: 300,
|
|
||||||
height: 14,
|
|
||||||
margin: const EdgeInsets.only(bottom: 4),
|
|
||||||
color: bgColor,
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
width: 180,
|
|
||||||
height: 14,
|
|
||||||
margin: const EdgeInsets.only(bottom: 10),
|
|
||||||
color: bgColor,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
width: 40,
|
|
||||||
height: 14,
|
|
||||||
margin: const EdgeInsets.only(bottom: 4),
|
|
||||||
color: bgColor,
|
|
||||||
),
|
|
||||||
const Spacer(),
|
|
||||||
Container(
|
|
||||||
width: 30,
|
|
||||||
height: 14,
|
|
||||||
margin: const EdgeInsets.only(bottom: 4),
|
|
||||||
color: bgColor,
|
|
||||||
),
|
|
||||||
const SizedBox(width: 8),
|
|
||||||
Container(
|
|
||||||
width: 30,
|
|
||||||
height: 14,
|
|
||||||
margin: const EdgeInsets.only(bottom: 4),
|
|
||||||
color: bgColor,
|
|
||||||
),
|
|
||||||
const SizedBox(width: 8),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import 'package:PiliPlus/common/skeleton/skeleton.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class WhisperItemSkeleton extends StatelessWidget {
|
class WhisperItemSkeleton extends StatelessWidget {
|
||||||
@@ -7,35 +6,33 @@ class WhisperItemSkeleton extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final color = Theme.of(context).colorScheme.onInverseSurface;
|
final color = Theme.of(context).colorScheme.onInverseSurface;
|
||||||
return Skeleton(
|
return ListTile(
|
||||||
child: ListTile(
|
leading: Container(
|
||||||
leading: Container(
|
width: 45,
|
||||||
width: 45,
|
height: 45,
|
||||||
height: 45,
|
decoration: BoxDecoration(
|
||||||
decoration: BoxDecoration(
|
shape: BoxShape.circle,
|
||||||
shape: BoxShape.circle,
|
|
||||||
color: color,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
title: UnconstrainedBox(
|
|
||||||
alignment: Alignment.centerLeft,
|
|
||||||
child: Container(
|
|
||||||
width: 100,
|
|
||||||
height: 11,
|
|
||||||
color: color,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
subtitle: Container(
|
|
||||||
color: color,
|
color: color,
|
||||||
width: 125,
|
|
||||||
height: 11,
|
|
||||||
),
|
),
|
||||||
trailing: Container(
|
),
|
||||||
|
title: UnconstrainedBox(
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: Container(
|
||||||
|
width: 100,
|
||||||
|
height: 11,
|
||||||
color: color,
|
color: color,
|
||||||
width: 50,
|
|
||||||
height: 11,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
subtitle: Container(
|
||||||
|
color: color,
|
||||||
|
width: 125,
|
||||||
|
height: 11,
|
||||||
|
),
|
||||||
|
trailing: Container(
|
||||||
|
color: color,
|
||||||
|
width: 50,
|
||||||
|
height: 11,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,12 +21,10 @@ class VideoCardH extends StatelessWidget {
|
|||||||
super.key,
|
super.key,
|
||||||
required this.videoItem,
|
required this.videoItem,
|
||||||
this.onTap,
|
this.onTap,
|
||||||
this.onViewLater,
|
|
||||||
this.onRemove,
|
this.onRemove,
|
||||||
});
|
});
|
||||||
final HorizontalVideoModel videoItem;
|
final HorizontalVideoModel videoItem;
|
||||||
final VoidCallback? onTap;
|
final VoidCallback? onTap;
|
||||||
final ValueChanged<int>? onViewLater;
|
|
||||||
final VoidCallback? onRemove;
|
final VoidCallback? onRemove;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
@@ -50,30 +50,27 @@ class _LivePageState extends State<LivePage>
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
super.build(context);
|
super.build(context);
|
||||||
final ThemeData theme = Theme.of(context);
|
final ThemeData theme = Theme.of(context);
|
||||||
return Container(
|
return refreshIndicator(
|
||||||
clipBehavior: Clip.hardEdge,
|
onRefresh: controller.onRefresh,
|
||||||
margin: const EdgeInsets.symmetric(horizontal: Style.safeSpace),
|
child: CustomScrollView(
|
||||||
decoration: const BoxDecoration(borderRadius: Style.mdRadius),
|
controller: controller.scrollController,
|
||||||
child: refreshIndicator(
|
physics: const AlwaysScrollableScrollPhysics(),
|
||||||
onRefresh: controller.onRefresh,
|
slivers: [
|
||||||
child: CustomScrollView(
|
SliverPadding(
|
||||||
controller: controller.scrollController,
|
padding: const .only(
|
||||||
physics: const AlwaysScrollableScrollPhysics(),
|
left: Style.cardSpace,
|
||||||
slivers: [
|
top: Style.cardSpace,
|
||||||
SliverPadding(
|
right: Style.cardSpace,
|
||||||
padding: const EdgeInsets.only(
|
bottom: 100,
|
||||||
top: Style.cardSpace,
|
|
||||||
bottom: 100,
|
|
||||||
),
|
|
||||||
sliver: SliverMainAxisGroup(
|
|
||||||
slivers: [
|
|
||||||
Obx(() => _buildTop(theme, controller.topState.value)),
|
|
||||||
Obx(() => _buildBody(theme, controller.loadingState.value)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
sliver: SliverMainAxisGroup(
|
||||||
),
|
slivers: [
|
||||||
|
Obx(() => _buildTop(theme, controller.topState.value)),
|
||||||
|
Obx(() => _buildBody(theme, controller.loadingState.value)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,24 +29,24 @@ class _RcmdPageState extends State<RcmdPage>
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
super.build(context);
|
super.build(context);
|
||||||
final colorScheme = ColorScheme.of(context);
|
final colorScheme = ColorScheme.of(context);
|
||||||
return Container(
|
return refreshIndicator(
|
||||||
clipBehavior: .hardEdge,
|
onRefresh: controller.onRefresh,
|
||||||
margin: const .symmetric(horizontal: Style.safeSpace),
|
child: CustomScrollView(
|
||||||
decoration: const BoxDecoration(borderRadius: Style.mdRadius),
|
controller: controller.scrollController,
|
||||||
child: refreshIndicator(
|
physics: const AlwaysScrollableScrollPhysics(),
|
||||||
onRefresh: controller.onRefresh,
|
slivers: [
|
||||||
child: CustomScrollView(
|
SliverPadding(
|
||||||
controller: controller.scrollController,
|
padding: const .only(
|
||||||
physics: const AlwaysScrollableScrollPhysics(),
|
left: Style.safeSpace,
|
||||||
slivers: [
|
top: Style.cardSpace,
|
||||||
SliverPadding(
|
right: Style.safeSpace,
|
||||||
padding: const .only(top: Style.cardSpace, bottom: 100),
|
bottom: 100,
|
||||||
sliver: Obx(
|
|
||||||
() => _buildBody(colorScheme, controller.loadingState.value),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
sliver: Obx(
|
||||||
),
|
() => _buildBody(colorScheme, controller.loadingState.value),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -291,6 +291,7 @@ class ReplyItemGrpc extends StatelessWidget {
|
|||||||
padding: padding,
|
padding: padding,
|
||||||
child: custom_text.Text.rich(
|
child: custom_text.Text.rich(
|
||||||
primary: theme.colorScheme.primary,
|
primary: theme.colorScheme.primary,
|
||||||
|
maxLines: replyLevel == 1 ? 6 : null,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
height: 1.75,
|
height: 1.75,
|
||||||
fontSize: theme.textTheme.bodyMedium!.fontSize,
|
fontSize: theme.textTheme.bodyMedium!.fontSize,
|
||||||
|
|||||||
Reference in New Issue
Block a user