OffsetChangeObserver class

OffsetChangeObserver will observe the offset status of the widget.

Use of this observer requires widget inheritance WidgetsBindingObserver

Constructors

OffsetChangeObserver({required BuildContext context, required OffsetChangedCallback onChanged, KeyboardStateCallback? onKeyboard})
Create an observer who needs to observe the offset state of the widget.

Properties

context BuildContext
context is the context object of the widget that needs to be observed.
final
hashCode int
The hash code for this object.
no setterinherited
onChanged OffsetChangedCallback
Callback method when offset occurs.
final
onKeyboard KeyboardStateCallback?
Callback method when keyboard state occurs.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onChangeDependencies() → void
Called when a dependency of this State object changes.
onChangeMetrics() Future<void>
Called when the application's dimensions change.
onChangeState() → void
Called when the state changes.
onDispose() → void
Called when this object is removed from the tree permanently.
onInitState() → void
Initialization state.
toString() String
A string representation of this object.
inherited

Operators

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