mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-22 03:31:09 +08:00
mod: check future builder data
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -77,6 +77,15 @@ class _MemberArchivePageState extends State<MemberArchivePage> {
|
||||
builder: (BuildContext context, snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.done) {
|
||||
if (snapshot.data != null) {
|
||||
// TODO: refactor
|
||||
if (snapshot.data is! Map) {
|
||||
return HttpError(
|
||||
callback: () => setState(() {
|
||||
_futureBuilderFuture = _memberArchivesController
|
||||
.getMemberArchive('init');
|
||||
}),
|
||||
);
|
||||
}
|
||||
Map data = snapshot.data as Map;
|
||||
List list = _memberArchivesController.archivesList;
|
||||
if (data['status']) {
|
||||
|
||||
Reference in New Issue
Block a user