getStateHistory static method
Get state change history
Implementation
static List<Map<String, dynamic>> getStateHistory({int? limit}) {
if (!_enabled || !_trackStateHistory) {
return [];
}
final history = limit != null
? _stateHistory.take(limit).toList()
: _stateHistory;
return history.map((s) => s.toJson()).toList();
}