Session.newSession constructor
Create new session with given data
, id
and createdTime
If id
is not given, it tries to create a new unique id.
If createdTime
is not given, it sets the createdTime
to current time
Implementation
Session.newSession(Map<String, String> data,
{String? id, DateTime? createdTime})
: id = id ?? newId,
needsUpdate = true,
createdTime = createdTime ?? new DateTime.now() {
_data.addAll(data);
}