CdrsModel class

CDRs list model (contains list of recent calls, methods for managing them)

Inheritance

Constructors

CdrsModel.new({dynamic maxItems = 10})

Properties

cdrItems List<CdrModel>
Returns list of items
no setter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
isEmpty bool
Returns true when list of recent calls is empty
no setter
kMaxItems int
final
length int
Returns number of recent calls in list
no setter
onSaveChanges SaveChangesCallback?
Callback which model invokes when recent calls changes should be saved
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(CallModel c) → void
Add new recent call item based on specified CallModel
addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
inherited
loadFromJson(String cdrsJsonStr) bool
Load list of recent calls from json string
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
remove(int index) → void
Remote recent call item by its index in the list
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
setConnected(int callId, String from, String to, bool hasVideo) → void
Set 'connected' and other attributes of the recent call item specified by callId
setTerminated(int callId, int statusCode, String displName, String duration) → void
Set 'terminated' and other attributes of the recent call item specified by callId
storeToJson() String
Store list of recent calls to json string
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](int i) CdrModel
Returns recent call by its index in list