load illust with id; context menu

This commit is contained in:
wgh19
2024-05-14 22:15:05 +08:00
parent faa857b814
commit a8b0495fc6
6 changed files with 151 additions and 66 deletions

View File

@@ -887,3 +887,23 @@ class _CommentsPageState extends MultiPageLoadingState<_CommentsPage, Comment> {
}
class IllustPageWithId extends StatefulWidget {
const IllustPageWithId(this.id, {super.key});
final String id;
@override
State<IllustPageWithId> createState() => _IllustPageWithIdState();
}
class _IllustPageWithIdState extends LoadingState<IllustPageWithId, Illust> {
@override
Widget buildContent(BuildContext context, Illust data) {
return IllustPage(data);
}
@override
Future<Res<Illust>> loadData() {
return Network().getIllustByID(widget.id);
}
}