AccountsModel class

Accounts list model (contains list of accounts, methods for managing them, handlers of library events)

Inheritance
Implemented types

Constructors

AccountsModel([ILogsModel? _logs])

Properties

accounts → List<AccountModel>
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 accounts is empty
no setter
length → int
Returns number of accounts in list
no setter
onSaveChanges ↔ SaveChangesCallback?
Callback which model invokes when accounts changes should be saved
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selAccountId → int?
Returns id of the selected account
no setter

Methods

addAccount(AccountModel acc, {bool saveChanges = true}) → Future<void>
Add new account
addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
deleteAccount(int index) → Future<void>
Delete account specified by its index in the list
dispose() → void
Discards any resources used by the object.
inherited
genAccInstId() → Future<String?>
Generates unique instance id. Used as value of AccountModel.instanceId
getAccId(String uri) → int
Get accountId by its uri
override
getUri(int accId) → String
Get accountUri by its id
override
hasSecureMedia(int accId) → bool
Returns true if account with specified id enabled secure media
override
isUpgradeToVideoModeRecvOnly(String uri) → bool
Returns true if account with specified id has 'upgradeToVideo' set to 'RecvOnly'
override
loadFromJson(String accJsonStr) → Future<bool>
Load list of accounts 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
onRegStateChanged(int accId, RegState state, String response) → void
Handles registtation state changes when received response from server
refreshRegistration() → Future<void>
Refresh registration of the all existing accounts (with default or specified regExpire>0)
override
registerAccount(int index) → Future<void>
Refresh registration of the account specified 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
setSelectedAccountById(int accId) → void
Set account as selected by its id
setSelectedAccountByUri(String uri) → void
Set account as selected by its uri
storeToJson() → String
Store list of accounts to json string
toString() → String
A string representation of this object.
inherited
unregisterAccount(int index) → Future<void>
Unregister account specified by its index in the list
updateAccount(AccountModel acc) → Future<void>
Update existing account with new params values

Operators

operator ==(Object other) → bool
The equality operator.
inherited
operator [](int i) → AccountModel
Returns account by its index in list