OrganizationService class
Methods
-
addError(Object error, [StackTrace? stackTrace])
→ void
-
Reports an
error
which triggers onError
with an optional StackTrace.
inherited
-
addStateMessage(Message message)
→ void
-
Removes the given
message
from the state
inherited
-
close()
→ Future<void>
-
Closes the instance.
This method should be called when the instance is no longer needed.
Once close is called, the instance can no longer be used.
-
createOrganization(String orgName, List<ContactInput>? contacts, List<AddressInput>? addresses, String? businessRef, {Key? orgKey})
→ Future<Organization?>
-
-
emit(OrganizationState state)
→ void
-
Updates the
state
to the provided state
.
emit
does nothing if the state
being emitted
is equal to the current state
.
inherited
-
ensureLoadingFinished(LoadingState loadingState)
→ Future<void>
-
This method should be called when you want
to wait for a particular loading state to
finish.
inherited
-
ensureLoadingStarted(LoadingState loadingState)
→ Future<void>
-
This method should be called when you want
to wait for a particular loading state to
start.
inherited
-
getOrgConfig(String orgId, {required String key})
→ Map<String, dynamic>
-
-
loadOrgs()
→ Future<List<Organization>?>
-
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
onChange(Change<OrganizationState> change)
→ void
-
Called whenever a
change
occurs with the given change
.
A change
occurs when a new state
is emitted.
onChange
is called before the state
of the cubit
is updated.
onChange
is a great spot to add logging/analytics for a specific cubit
.
inherited
-
onError(Object error, StackTrace stackTrace)
→ void
-
Called whenever an
error
occurs and notifies BlocObserver.onError
.
inherited
-
readOrgData(Organization org)
→ Future<void>
-
-
removeStateMessage(Message message)
→ void
-
Removes the given
message
from the state
inherited
-
setCurrentContext(BuildContext context)
→ void
-
This method is called by from the top level
of the widget tree to initialize the service's
localizations so it can be applied throughout
the service regardless of whether if the
context is available. This method should return
either itself initialized with the context or
a new instance of the
Service
initialized with
the context. This is a convenience method that
allows the service to be initialized with the
context without having to create a new instance
and is called by the Feature
class when creating
BLoC providers for the service.
override
-
toString()
→ String
-
A string representation of this object.
inherited
-
updateOrganization(String orgId, {List<ContactInput>? contacts, List<AddressInput>? addresses, Key? orgKey})
→ Future<void>
-
-
updateOrgConfig(String orgId, {required String key, required Map<String, dynamic> config})
→ Future<void>
-
-
updateOrgUsers(Organization org, {List<String>? add, List<String>? remove, Key? orgKey})
→ Future<void>
-