mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: check future builder data
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import 'package:PiliPalaX/common/widgets/http_error.dart';
|
||||
import 'package:easy_debounce/easy_throttle.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -59,6 +60,16 @@ class _MemberSeasonsPageState extends State<MemberSeasonsPage> {
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.done) {
|
||||
if (snapshot.data != null) {
|
||||
// TODO: refactor
|
||||
if (snapshot.data is! Map) {
|
||||
return HttpError(
|
||||
isSliver: false,
|
||||
callback: () => setState(() {
|
||||
_futureBuilderFuture = _memberSeasonsController
|
||||
.getSeasonDetail('onRefresh');
|
||||
}),
|
||||
);
|
||||
}
|
||||
Map data = snapshot.data as Map;
|
||||
List list = _memberSeasonsController.seasonsList;
|
||||
if (data['status']) {
|
||||
|
||||
Reference in New Issue
Block a user