Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-12-27 20:54:41 +08:00
parent 25acf3a9bb
commit b51c646415
227 changed files with 768 additions and 764 deletions

View File

@@ -39,7 +39,7 @@ class AtMeController extends CommonListController<MsgAtData, MsgAtItem> {
@pragma('vm:notify-debugger-on-exception')
Future<void> onRemove(Object id, int index) async {
try {
var res = await MsgHttp.delMsgfeed(2, id);
final res = await MsgHttp.delMsgfeed(2, id);
if (res.isSuccess) {
loadingState
..value.data!.removeAt(index)

View File

@@ -84,7 +84,7 @@ class _AtMePageState extends State<AtMePage> {
itemCount: 12,
itemBuilder: (context, index) => const MsgFeedTopSkeleton(),
),
Success(:var response) =>
Success(:final response) =>
response != null && response.isNotEmpty
? SliverList.separated(
itemCount: response.length,
@@ -175,7 +175,7 @@ class _AtMePageState extends State<AtMePage> {
separatorBuilder: (context, index) => divider,
)
: HttpError(onReload: _atMeController.onReload),
Error(:var errMsg) => HttpError(
Error(:final errMsg) => HttpError(
errMsg: errMsg,
onReload: _atMeController.onReload,
),

View File

@@ -66,7 +66,7 @@ class _LikeDetailPageState extends State<LikeDetailPage> {
itemCount: 12,
itemBuilder: (context, index) => const MsgFeedTopSkeleton(),
),
Success(:var response) => SliverMainAxisGroup(
Success(:final response) => SliverMainAxisGroup(
slivers: [
if (_controller.card != null) ...[
_buildCard(_controller.card!),
@@ -89,7 +89,7 @@ class _LikeDetailPageState extends State<LikeDetailPage> {
),
],
),
Error(:var errMsg) => HttpError(
Error(:final errMsg) => HttpError(
errMsg: errMsg,
onReload: _controller.onReload,
),

View File

@@ -65,7 +65,7 @@ class LikeMeController
Future<void> onRemove(dynamic id, int index, bool isLatest) async {
try {
var res = await MsgHttp.delMsgfeed(0, id);
final res = await MsgHttp.delMsgfeed(0, id);
if (res.isSuccess) {
Pair<List<MsgLikeItem>, List<MsgLikeItem>> pair =
loadingState.value.data;
@@ -84,7 +84,7 @@ class LikeMeController
Future<void> onSetNotice(MsgLikeItem item, bool isNotice) async {
int noticeState = isNotice ? 1 : 0;
var res = await MsgHttp.msgSetNotice(
final res = await MsgHttp.msgSetNotice(
id: item.id!,
noticeState: noticeState,
);

View File

@@ -82,7 +82,7 @@ class _LikeMePageState extends State<LikeMePage> {
itemCount: 12,
itemBuilder: (context, index) => const MsgFeedTopSkeleton(),
),
Success(:var response) => Builder(
Success(:final response) => Builder(
builder: (context) {
Pair<List<MsgLikeItem>, List<MsgLikeItem>> pair = response;
List<MsgLikeItem> latest = pair.first;
@@ -134,7 +134,7 @@ class _LikeMePageState extends State<LikeMePage> {
return HttpError(onReload: _likeMeController.onReload);
},
),
Error(:var errMsg) => HttpError(
Error(:final errMsg) => HttpError(
errMsg: errMsg,
onReload: _likeMeController.onReload,
),

View File

@@ -39,7 +39,7 @@ class ReplyMeController
Future<void> onRemove(dynamic id, int index) async {
try {
var res = await MsgHttp.delMsgfeed(1, id);
final res = await MsgHttp.delMsgfeed(1, id);
if (res.isSuccess) {
loadingState
..value.data!.removeAt(index)

View File

@@ -84,7 +84,7 @@ class _ReplyMePageState extends State<ReplyMePage> {
itemCount: 12,
itemBuilder: (context, index) => const MsgFeedTopSkeleton(),
),
Success(:var response) =>
Success(:final response) =>
response != null && response.isNotEmpty
? SliverList.separated(
itemCount: response.length,
@@ -199,7 +199,7 @@ class _ReplyMePageState extends State<ReplyMePage> {
separatorBuilder: (context, index) => divider,
)
: HttpError(onReload: _replyMeController.onReload),
Error(:var errMsg) => HttpError(
Error(:final errMsg) => HttpError(
errMsg: errMsg,
onReload: _replyMeController.onReload,
),

View File

@@ -36,7 +36,7 @@ class SysMsgController
Future<void> onRemove(dynamic id, int index) async {
try {
var res = await MsgHttp.delSysMsg(id);
final res = await MsgHttp.delSysMsg(id);
if (res.isSuccess) {
loadingState
..value.data!.removeAt(index)

View File

@@ -70,7 +70,7 @@ class _SysMsgPageState extends State<SysMsgPage> {
itemBuilder: (context, index) => const MsgFeedSysMsgSkeleton(),
),
),
Success(:var response) =>
Success(:final response) =>
response != null && response.isNotEmpty
? SliverList.separated(
itemCount: response.length,
@@ -125,7 +125,7 @@ class _SysMsgPageState extends State<SysMsgPage> {
separatorBuilder: (context, index) => divider,
)
: HttpError(onReload: _sysMsgController.onReload),
Error(:var errMsg) => HttpError(
Error(:final errMsg) => HttpError(
errMsg: errMsg,
onReload: _sysMsgController.onReload,
),