add method

dynamic add(
  1. LoginHistory history
)

Implementation

add(LoginHistory history) async {
  list.removeWhere((element) =>
      element.apiUrl == history.apiUrl &&
      element.username == history.username);
  list.insert(0, history);
  await save();
}