translateY method

Widget translateY(
  1. double y, {
  2. bool fractional = false,
  3. double? from,
})

Applies a TranslateEffect to a Widget only on the y-axis. fractional determines whether the offset moves the Widget by using its own size as a percentage or by a fixed amount.

Implementation

Widget translateY(
  double y, {
  bool fractional = false,
  double? from,
}) {
  return EffectWidget(
    start: from == null
        ? null
        : TranslateEffect(
            offset: Offset(0, from),
            fractional: fractional,
          ),
    end: TranslateEffect(
      offset: Offset(0, y),
      fractional: fractional,
    ),
    child: this,
  );
}