I am trying to define an abstract parent class Event and a concrete child PlaceChangeEvent:
abstract class Event {
String name;
DateTime occurredAt;
int handleCount;
Event(this.name, this.occurredAt, [this.handleCount = 0]);
}
class PlaceChangeEvent implements Event {
Place place;
PlaceChangeEvent(Place place) : super(place.name, DateTime.now());
}
The PlaceChangeEvent is giving me 2 compiler warnings:
- The first is on the class name itself:
Missing inherited members: 'Event.name', 'Event.handleCount' and 'Event.occurredAt' - The second is on the call to
super:0 positional arguments expected, but 2 found
Where did I go wrong and what can I do to fix this? My intentions are to:
- Hardcode the parent's
namewith theplace.name; and - Hardcode the parent's
occurredAtproperty with the current date/time'; and - Initialize the parent's optional
handleCountproperty to 0 by simply not providing it.