API Reference 0.3.24dart_web_toolkit_uiLayoutCommandAnimationCallback

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

LayoutAnimationCallback

Constructors

new LayoutCommandAnimationCallback(LayoutCommand _command) #

Creates a new Object instance.

Object instances have no meaningful state, and are only useful through their identity. An Object instance is equal to itself only.

docs inherited from Object
LayoutCommandAnimationCallback(this._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);
 }
}