mirror of
https://github.com/simon-ding/polaris.git
synced 2026-06-09 03:27:39 +08:00
feat: change layout and periodically refresh api
This commit is contained in:
@@ -11,6 +11,8 @@ var activitiesDataProvider =
|
||||
class ActivityData extends AutoDisposeAsyncNotifier<List<Activity>> {
|
||||
@override
|
||||
FutureOr<List<Activity>> build() async {
|
||||
Timer(const Duration(seconds: 5), ref.invalidateSelf);//Periodically Refresh
|
||||
|
||||
final dio = await APIs.getDio();
|
||||
var resp = await dio.get(APIs.activityUrl);
|
||||
final sp = ServerResponse.fromJson(resp.data);
|
||||
|
||||
Reference in New Issue
Block a user