LayoutCommandAnimationCallback class
class LayoutCommandAnimationCallback implements LayoutAnimationCallback {
LayoutCommand _command;
LayoutCommandAnimationCallback(this._command);
void onAnimationComplete() {
// Chain to the passed callback.
if (_command.callback != null) {
_command.callback.onAnimationComplete();
}
}
void onLayout(Layer layer, double progress) {
// Inform the child associated with this layer that its size may
// have changed.
Widget child = layer.userObject as Widget;
if (child is RequiresResize) {
(child as RequiresResize).onResize();
}
// Chain to the passed callback.
if (_command.callback != null) {
_command.callback.onLayout(layer, progress);
}
}
}
Implements
Constructors
new LayoutCommandAnimationCallback(LayoutCommand _command) #
Methods
void onAnimationComplete() #
Called immediately after the animation is complete, and the entire layout is in its final state.
docs inherited from LayoutAnimationCallback
void onAnimationComplete() {
// Chain to the passed callback.
if (_command.callback != null) {
_command.callback.onAnimationComplete();
}
}
void onLayout(Layer layer, double progress) #
Called at each step of the animation, for each layer being laid out.
@param layer the layer being laid out
docs inherited from LayoutAnimationCallback
void onLayout(Layer layer, double progress) {
// Inform the child associated with this layer that its size may
// have changed.
Widget child = layer.userObject as Widget;
if (child is RequiresResize) {
(child as RequiresResize).onResize();
}
// Chain to the passed callback.
if (_command.callback != null) {
_command.callback.onLayout(layer, progress);
}
}