opt: some widgets

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-03-12 16:30:24 +08:00
parent 5f2ac0d59b
commit b4412f5b37
4 changed files with 136 additions and 108 deletions

View File

@@ -24,7 +24,13 @@ void autoWrapReportDialog(
actionsPadding: const EdgeInsets.only(left: 16, right: 16, bottom: 10),
content: Builder(
builder: (context) {
return SingleChildScrollView(
return Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Flexible(
child: Material(
child: SingleChildScrollView(
child: AnimatedSize(
duration: const Duration(milliseconds: 200),
child: Column(
@@ -48,12 +54,14 @@ void autoWrapReportDialog(
child: Text(
title.key,
style: TextStyle(
color:
Theme.of(context).colorScheme.outline),
color: Theme.of(context)
.colorScheme
.outline),
),
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 12),
padding: const EdgeInsets.symmetric(
horizontal: 12),
child: Wrap(
children: title.value.entries.map((opt) {
return IntrinsicWidth(
@@ -61,11 +69,13 @@ void autoWrapReportDialog(
value: opt.key,
groupValue: reasonType,
title: opt.value,
padding: const EdgeInsets.only(right: 10),
padding: const EdgeInsets.only(
right: 10),
onChanged: (value) {
reasonType = value;
if (context.mounted) {
(context as Element?)?.markNeedsBuild();
(context as Element?)
?.markNeedsBuild();
}
},
),
@@ -94,7 +104,8 @@ void autoWrapReportDialog(
LengthLimitingTextInputFormatter(60),
],
decoration: const InputDecoration(
labelText: '为帮助审核人员更快处理,请补充问题类型和出现位置等详细信息',
labelText:
'为帮助审核人员更快处理,请补充问题类型和出现位置等详细信息',
border: OutlineInputBorder(),
contentPadding: EdgeInsets.all(10),
),
@@ -108,6 +119,12 @@ void autoWrapReportDialog(
),
),
),
],
),
),
),
),
),
GestureDetector(
onTap: () {
banUid = !banUid;
@@ -124,9 +141,7 @@ void autoWrapReportDialog(
: Icons.check_box_outline_blank,
color: banUid
? Theme.of(context).colorScheme.primary
: Theme.of(context)
.colorScheme
.onSurfaceVariant,
: Theme.of(context).colorScheme.onSurfaceVariant,
),
Text(
' 拉黑该用户',
@@ -141,8 +156,6 @@ void autoWrapReportDialog(
),
),
],
),
),
);
},
),

View File

@@ -99,7 +99,6 @@ class HomeController extends GetxController with GetTickerProviderStateMixin {
@override
void dispose() {
tabController.animation?.removeListener(() {});
tabController.dispose();
super.dispose();
}

View File

@@ -299,6 +299,7 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
child: videoItem['staff'] == null
? GestureDetector(
onTap: onPushMember,
behavior: HitTestBehavior.opaque,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,

View File

@@ -377,6 +377,21 @@ class _SendDanmakuPanelState extends CommonPublishPageState<SendDanmakuPanel> {
),
),
),
Obx(
() => enablePublish.value
? iconButton(
context: context,
bgColor: Colors.transparent,
iconSize: 22,
iconColor: themeData.colorScheme.onSurfaceVariant,
onPressed: () {
editController.clear();
enablePublish.value = false;
},
icon: Icons.clear,
)
: const SizedBox.shrink(),
),
const SizedBox(width: 12),
Obx(
() => iconButton(