AppController class abstract

Base controller class with deterministic lifecycle management.

Supports both fine-grained reactive Rx + Watch observables and lightweight manual rebuilds via update + AppBuilder, with automatic listener cleanup and route-bound disposal.

Implementers

Constructors

AppController()

Properties

hashCode → int
The hash code for this object.
no setterinherited
isClosed → bool
Whether this controller has been disposed/closed.
no setter
isControllerReady → bool
Whether onReady has been executed.
no setter
isDisposed → bool
Whether onClose has been executed.
no setter
isInitialized → bool
Whether onInit has been executed.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
updateListenerCount → int
Number of currently active manual update listeners (exposed for leak testing).
no setter

Methods

addIdListener(Object id, VoidCallback listener) → void
Registers an id-scoped listener notified when update targets id or performs an unscoped refresh.
addListener(VoidCallback listener) → void
Registers an unscoped listener notified when update is called.
autoCancel(RxSubscription subscription) → void
Registers an RxSubscription to be automatically cancelled when this controller is disposed.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onClose() → void
Called when the route or widget binding is removed from the navigation stack.
onDetached() → void
Called when the app process is being terminated or detached.
onHidden() → void
Called when the app becomes hidden (Flutter 3.13+).
onInactive() → void
Called when an incoming phone call, Control Center, or system dialog overlays the app.
onInit() → void
Called immediately when the controller is registered or instantiated.
onPaused() → void
Called when the mobile operating system backgrounds the app (e.g. Home button pressed, task switcher opened, camera launched).
onReady() → void
Called after the widget frame is rendered and the controller is bound to UI.
onResumed() → void
Called when the mobile operating system brings the app to the foreground.
removeIdListener(Object id, VoidCallback listener) → void
Unregisters a previously registered id-scoped listener.
removeListener(VoidCallback listener) → void
Unregisters a previously registered unscoped listener.
toString() → String
A string representation of this object.
inherited
update([List<Object>? ids, bool condition = true]) → void
Notifies AppBuilder listeners to rebuild UI cleanly.

Operators

operator ==(Object other) → bool
The equality operator.
inherited