dart_mock/lib/person_data_access_map.dart

14 lines
275 B
Dart
Raw Normal View History

2023-02-13 11:42:22 +01:00
import 'person.dart';
class PersonDataAccessMap {
final Map<int, Person> _persons = {};
void store(Person p) => _persons[p.id] = p;
Person? retrieve(int personId) => _persons[personId];
List<Person> retrieveAll() => _persons.values.toList();
void close() {}
}