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:
@@ -63,7 +63,7 @@ class ArticleController extends ReplyController<MainListReply> {
|
||||
}
|
||||
}
|
||||
|
||||
init() {
|
||||
void init() {
|
||||
url = type == 'read'
|
||||
? 'https://www.bilibili.com/read/cv$id'
|
||||
: 'https://www.bilibili.com/opus/$id';
|
||||
|
||||
@@ -54,45 +54,46 @@ class _ArticlePageState extends State<ArticlePage>
|
||||
|
||||
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() {
|
||||
@@ -380,7 +381,7 @@ class _ArticlePageState extends State<ArticlePage>
|
||||
);
|
||||
}
|
||||
} else {
|
||||
content = SliverToBoxAdapter(child: Text('NULL'));
|
||||
content = const SliverToBoxAdapter(child: Text('NULL'));
|
||||
}
|
||||
|
||||
int? pubTime =
|
||||
@@ -392,7 +393,7 @@ class _ArticlePageState extends State<ArticlePage>
|
||||
SliverToBoxAdapter(
|
||||
child: Text(
|
||||
_articleCtr.summary.title!,
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
fontSize: 17,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
@@ -568,7 +569,7 @@ class _ArticlePageState extends State<ArticlePage>
|
||||
builder: (context) => Align(
|
||||
alignment: Alignment.topRight,
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(
|
||||
margin: const EdgeInsets.only(
|
||||
top: 56,
|
||||
right: 16,
|
||||
),
|
||||
@@ -599,7 +600,7 @@ class _ArticlePageState extends State<ArticlePage>
|
||||
},
|
||||
icon: Transform.rotate(
|
||||
angle: pi / 2,
|
||||
child: Icon(Icons.splitscreen, size: 19),
|
||||
child: const Icon(Icons.splitscreen, size: 19),
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
@@ -686,7 +687,7 @@ class _ArticlePageState extends State<ArticlePage>
|
||||
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,
|
||||
|
||||
@@ -249,7 +249,7 @@ class OpusContent extends StatelessWidget {
|
||||
if (element.linkCard?.card?.itemNull?.icon
|
||||
?.isNullOrEmpty ==
|
||||
true)
|
||||
Icon(Icons.info, size: 20),
|
||||
const Icon(Icons.info, size: 20),
|
||||
Text(' ${element.linkCard?.card?.itemNull?.text}'),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user