mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-17 23:56:13 +08:00
@@ -155,11 +155,13 @@ class _CreateFavPageState extends State<CreateFavPage> {
|
|||||||
bucket: 'medialist',
|
bucket: 'medialist',
|
||||||
dir: 'cover',
|
dir: 'cover',
|
||||||
).then((res) {
|
).then((res) {
|
||||||
if (res['status']) {
|
if (context.mounted) {
|
||||||
_cover = res['data']['location'];
|
if (res['status']) {
|
||||||
(context as Element).markNeedsBuild();
|
_cover = res['data']['location'];
|
||||||
} else {
|
(context as Element).markNeedsBuild();
|
||||||
SmartDialog.showToast(res['msg']);
|
} else {
|
||||||
|
SmartDialog.showToast(res['msg']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -188,9 +188,7 @@ class _PayCoinsPageState extends State<PayCoinsPage>
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _scale() {
|
void _scale() {
|
||||||
_scale22Controller.forward().whenComplete(() {
|
_scale22Controller.forward().whenComplete(_scale22Controller.reverse);
|
||||||
_scale22Controller.reverse();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void _onScroll(int index) {
|
void _onScroll(int index) {
|
||||||
@@ -478,9 +476,7 @@ class _PayCoinsPageState extends State<PayCoinsPage>
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
_boxAnimController.forward().whenComplete(() {
|
_boxAnimController.forward().whenComplete(_boxAnimController.reverse);
|
||||||
_boxAnimController.reverse();
|
|
||||||
});
|
|
||||||
_coinSlideController.forward().whenComplete(() {
|
_coinSlideController.forward().whenComplete(() {
|
||||||
_coinFadeController.forward().whenComplete(() {
|
_coinFadeController.forward().whenComplete(() {
|
||||||
Get.back();
|
Get.back();
|
||||||
|
|||||||
@@ -163,17 +163,17 @@ class _PostPanelState extends CommonCollapseSlidePageState<PostPanel> {
|
|||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
],
|
],
|
||||||
Wrap(
|
Builder(
|
||||||
runSpacing: 8,
|
builder: (context) {
|
||||||
spacing: 16,
|
return Wrap(
|
||||||
children: [
|
runSpacing: 8,
|
||||||
Row(
|
spacing: 16,
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
children: [
|
||||||
const Text('分类: '),
|
Row(
|
||||||
Builder(
|
mainAxisSize: MainAxisSize.min,
|
||||||
builder: (context) {
|
children: [
|
||||||
return PopupMenuButton<SegmentType>(
|
const Text('分类: '),
|
||||||
|
PopupMenuButton<SegmentType>(
|
||||||
initialValue:
|
initialValue:
|
||||||
list![index].category,
|
list![index].category,
|
||||||
onSelected: (item) {
|
onSelected: (item) {
|
||||||
@@ -249,76 +249,92 @@ class _PostPanelState extends CommonCollapseSlidePageState<PostPanel> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
),
|
||||||
},
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
const Text('行为类别: '),
|
||||||
|
Builder(
|
||||||
|
builder: (context) {
|
||||||
|
return PopupMenuButton<
|
||||||
|
ActionType>(
|
||||||
|
initialValue:
|
||||||
|
list![index].actionType,
|
||||||
|
onSelected: (item) {
|
||||||
|
list![index].actionType =
|
||||||
|
item;
|
||||||
|
if (item ==
|
||||||
|
ActionType.full) {
|
||||||
|
updateSegment(
|
||||||
|
isFirst: true,
|
||||||
|
index: index,
|
||||||
|
value: 0,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
(context as Element)
|
||||||
|
.markNeedsBuild();
|
||||||
|
},
|
||||||
|
itemBuilder: (context) =>
|
||||||
|
ActionType.values
|
||||||
|
.map(
|
||||||
|
(item) =>
|
||||||
|
PopupMenuItem<
|
||||||
|
ActionType>(
|
||||||
|
enabled: list![
|
||||||
|
index]
|
||||||
|
.category
|
||||||
|
.toActionType
|
||||||
|
.contains(
|
||||||
|
item),
|
||||||
|
value: item,
|
||||||
|
child: Text(
|
||||||
|
item.title),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
.toList(),
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize:
|
||||||
|
MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
list![index]
|
||||||
|
.actionType
|
||||||
|
.title,
|
||||||
|
style: TextStyle(
|
||||||
|
height: 1,
|
||||||
|
fontSize: 14,
|
||||||
|
color: theme
|
||||||
|
.colorScheme
|
||||||
|
.secondary,
|
||||||
|
),
|
||||||
|
strutStyle:
|
||||||
|
const StrutStyle(
|
||||||
|
height: 1,
|
||||||
|
leading: 0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Icon(
|
||||||
|
MdiIcons
|
||||||
|
.unfoldMoreHorizontal,
|
||||||
|
size: MediaQuery
|
||||||
|
.textScalerOf(
|
||||||
|
context)
|
||||||
|
.scale(14),
|
||||||
|
color: theme.colorScheme
|
||||||
|
.secondary,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
);
|
||||||
Row(
|
},
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
const Text('行为类别: '),
|
|
||||||
Builder(builder: (context) {
|
|
||||||
return PopupMenuButton<ActionType>(
|
|
||||||
initialValue:
|
|
||||||
list![index].actionType,
|
|
||||||
onSelected: (item) {
|
|
||||||
list![index].actionType = item;
|
|
||||||
if (item == ActionType.full) {
|
|
||||||
updateSegment(
|
|
||||||
isFirst: true,
|
|
||||||
index: index,
|
|
||||||
value: 0,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
(context as Element)
|
|
||||||
.markNeedsBuild();
|
|
||||||
},
|
|
||||||
itemBuilder: (context) => ActionType
|
|
||||||
.values
|
|
||||||
.map(
|
|
||||||
(item) =>
|
|
||||||
PopupMenuItem<ActionType>(
|
|
||||||
enabled: list![index]
|
|
||||||
.category
|
|
||||||
.toActionType
|
|
||||||
.contains(item),
|
|
||||||
value: item,
|
|
||||||
child: Text(item.title),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
.toList(),
|
|
||||||
child: Row(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
list![index].actionType.title,
|
|
||||||
style: TextStyle(
|
|
||||||
height: 1,
|
|
||||||
fontSize: 14,
|
|
||||||
color: theme
|
|
||||||
.colorScheme.secondary,
|
|
||||||
),
|
|
||||||
strutStyle: const StrutStyle(
|
|
||||||
height: 1,
|
|
||||||
leading: 0,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Icon(
|
|
||||||
MdiIcons.unfoldMoreHorizontal,
|
|
||||||
size: MediaQuery.textScalerOf(
|
|
||||||
context)
|
|
||||||
.scale(14),
|
|
||||||
color: theme
|
|
||||||
.colorScheme.secondary,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user