mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: lint
mod: tweaks opt: publish page Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -38,7 +38,7 @@ class DynamicDetailController extends ReplyController<MainListReply> {
|
||||
}
|
||||
}
|
||||
|
||||
getCommentParams(int id) async {
|
||||
Future<void> getCommentParams(int id) async {
|
||||
var res = await DynamicsHttp.opusDetail(opusId: id);
|
||||
if (res is Success) {
|
||||
final data = (res as Success<DynamicItemModel>).response;
|
||||
|
||||
@@ -57,45 +57,46 @@ class _DynamicDetailPageState extends State<DynamicDetailPage>
|
||||
|
||||
late final _key = GlobalKey<ScaffoldState>();
|
||||
|
||||
get _getImageCallback => _horizontalPreview
|
||||
? (imgList, index) {
|
||||
_imageStatus = true;
|
||||
bool isFabVisible = _isFabVisible;
|
||||
if (isFabVisible) {
|
||||
_hideFab();
|
||||
}
|
||||
final ctr = AnimationController(
|
||||
vsync: this,
|
||||
duration: const Duration(milliseconds: 200),
|
||||
)..forward();
|
||||
PageUtils.onHorizontalPreview(
|
||||
_key,
|
||||
AnimationController(
|
||||
vsync: this,
|
||||
duration: Duration.zero,
|
||||
),
|
||||
ctr,
|
||||
imgList,
|
||||
index,
|
||||
(value) async {
|
||||
_imageStatus = null;
|
||||
Function(dynamic imgList, dynamic index)? get _getImageCallback =>
|
||||
_horizontalPreview
|
||||
? (imgList, index) {
|
||||
_imageStatus = true;
|
||||
bool isFabVisible = _isFabVisible;
|
||||
if (isFabVisible) {
|
||||
isFabVisible = false;
|
||||
_showFab();
|
||||
_hideFab();
|
||||
}
|
||||
if (value == false) {
|
||||
await ctr.reverse();
|
||||
}
|
||||
try {
|
||||
ctr.dispose();
|
||||
} catch (_) {}
|
||||
if (value == false) {
|
||||
Get.back();
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
: null;
|
||||
final ctr = AnimationController(
|
||||
vsync: this,
|
||||
duration: const Duration(milliseconds: 200),
|
||||
)..forward();
|
||||
PageUtils.onHorizontalPreview(
|
||||
_key,
|
||||
AnimationController(
|
||||
vsync: this,
|
||||
duration: Duration.zero,
|
||||
),
|
||||
ctr,
|
||||
imgList,
|
||||
index,
|
||||
(value) async {
|
||||
_imageStatus = null;
|
||||
if (isFabVisible) {
|
||||
isFabVisible = false;
|
||||
_showFab();
|
||||
}
|
||||
if (value == false) {
|
||||
await ctr.reverse();
|
||||
}
|
||||
try {
|
||||
ctr.dispose();
|
||||
} catch (_) {}
|
||||
if (value == false) {
|
||||
Get.back();
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
: null;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@@ -112,7 +113,7 @@ class _DynamicDetailPageState extends State<DynamicDetailPage>
|
||||
}
|
||||
|
||||
// 页面初始化
|
||||
void init() async {
|
||||
Future<void> init() async {
|
||||
Map args = Get.arguments;
|
||||
// 楼层
|
||||
int floor = args['floor'];
|
||||
@@ -310,7 +311,7 @@ class _DynamicDetailPageState extends State<DynamicDetailPage>
|
||||
builder: (context) => Align(
|
||||
alignment: Alignment.topRight,
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(
|
||||
margin: const EdgeInsets.only(
|
||||
top: 56,
|
||||
right: 16,
|
||||
),
|
||||
@@ -341,7 +342,7 @@ class _DynamicDetailPageState extends State<DynamicDetailPage>
|
||||
},
|
||||
icon: Transform.rotate(
|
||||
angle: pi / 2,
|
||||
child: Icon(Icons.splitscreen, size: 19),
|
||||
child: const Icon(Icons.splitscreen, size: 19),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 16),
|
||||
@@ -462,7 +463,7 @@ class _DynamicDetailPageState extends State<DynamicDetailPage>
|
||||
child: SlideTransition(
|
||||
position: Tween<Offset>(
|
||||
begin: const Offset(0, 1),
|
||||
end: const Offset(0, 0),
|
||||
end: Offset.zero,
|
||||
).animate(CurvedAnimation(
|
||||
parent: _fabAnimationCtr!,
|
||||
curve: Curves.easeInOut,
|
||||
|
||||
Reference in New Issue
Block a user