|
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() {}
|
|
}
|