Lowering time between API Refreshs
This commit is contained in:
@@ -15,13 +15,13 @@ import 'package:flutter/material.dart';
|
||||
///
|
||||
/// A refresh happens quietly: implementations are expected to keep the data
|
||||
/// that is already on screen while the request runs, so that the user neither
|
||||
/// sees a spinner nor loses the scroll position every half minute. Failures of
|
||||
/// sees a spinner nor loses the scroll position every few seconds. Failures of
|
||||
/// a refresh are swallowed on purpose - the data on screen simply stays as it
|
||||
/// is and the next tick tries again.
|
||||
mixin AutoRefreshState<TWidget extends StatefulWidget> on State<TWidget> {
|
||||
|
||||
/// Interval in which the api data of the whole app is refreshed.
|
||||
static const Duration refreshInterval = Duration(seconds: 30);
|
||||
static const Duration refreshInterval = Duration(seconds: 15);
|
||||
|
||||
Timer? _refreshTimer;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user