buildAnimatedPositioned method

  1. @protected
Widget buildAnimatedPositioned(
  1. BuildParameters params
)

Implementation

@protected
Widget buildAnimatedPositioned(BuildParameters params) {
  final onEnd = events.getFunction(params.context, params.actions["onEnd"],
      params.state, params.parentContext);
  final childSpec = params.widgets["child"];
  final child = childSpec != null
      ? builder.buildWidget(params.context, params.widgets["child"],
          params.state, params.parentContext)
      : const SizedBox();

  return AnimatedPositioned(
    key: properties.getKey(params.id),
    left: tryParseDouble(params.buildProp("left")),
    top: tryParseDouble(params.buildProp("top")),
    right: tryParseDouble(params.buildProp("right")),
    bottom: tryParseDouble(params.buildProp("bottom")),
    width: tryParseDouble(params.buildProp("width")),
    height: tryParseDouble(params.buildProp("height")),
    curve: params.buildProp("curve") ?? Curves.linear,
    duration: Duration(
        milliseconds: parseInt(params.props["duration"], defaultValue: 500)),
    onEnd: onEnd,
    child: child,
  );
}