updateInfo method
Implementation
void updateInfo(HistoryModel historyModel) {
final index = historys.indexWhere((e) => e.id == historyModel.id);
if (index != -1) {
historys[index] = historyModel;
final items = historys.map((e) => e.toJson()).toList();
Application.preferences.clear();
Application.preferences.setStringList(HISTORY, items);
}
}