You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
flutter_custom_calendar/lib/cache_data.dart

30 lines
569 B

4 years ago
import 'model/date_model.dart';
/**
*
*/
class CacheData {
//私有构造函数
CacheData._();
static CacheData _instance;
static CacheData get instance => _instance;
Map<DateModel, List<DateModel>> monthListCache = Map();
4 years ago
Map<DateModel, List<DateModel>> weekListCache = Map();
static CacheData getInstance() {
if (_instance == null) {
_instance = new CacheData._();
}
return _instance;
}
4 years ago
void clearData() {
monthListCache.clear();
weekListCache.clear();
}
}