chore: code clean up

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2024-11-10 09:49:06 +08:00
parent 03d405e197
commit 59910e275e
133 changed files with 597 additions and 816 deletions

View File

@@ -17,8 +17,7 @@ class ActionPanel extends StatefulWidget {
super.key,
this.item,
});
// ignore: prefer_typing_uninitialized_variables
final item;
final dynamic item;
@override
State<ActionPanel> createState() => _ActionPanelState();

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':
// 转发的投稿
@@ -40,7 +40,7 @@ Widget addWidget(item, context, type, {floor = 1}) {
SmartDialog.showToast(err.toString());
}
} else {
print("No match found.");
debugPrint("No match found.");
}
},
child: Container(

View File

@@ -15,8 +15,8 @@ class DynamicPanel extends StatelessWidget {
required this.item,
this.source,
this.onRemove,
Key? key,
}) : super(key: key);
super.key,
});
final DynamicsController _dynamicsController = Get.put(DynamicsController());

View File

@@ -364,7 +364,7 @@ InlineSpan richNode(item, context) {
);
}
} catch (err) {
print('❌rich_node_panel err: $err');
debugPrint('❌rich_node_panel err: $err');
return spacer;
}
}

View File

@@ -12,8 +12,7 @@ import 'package:PiliPalaX/utils/utils.dart';
class UpPanel extends StatefulWidget {
final FollowUpModel? upData;
final ScrollController scrollController;
const UpPanel(this.upData, this.scrollController, {Key? key})
: super(key: key);
const UpPanel(this.upData, this.scrollController, {super.key});
@override
State<UpPanel> createState() => _UpPanelState();
@@ -49,7 +48,7 @@ class _UpPanelState extends State<UpPanel> {
height: 45,
child: TextButton(
style: ButtonStyle(
padding: MaterialStateProperty.all(const EdgeInsets.only()),
padding: WidgetStateProperty.all(const EdgeInsets.only()),
),
child: Column(
children: [