translate method

Widget translate(
  1. Offset offset, {
  2. bool fractional = false,
  3. Offset? from,
})

Applies a TranslateEffect to a Widget with the given offset. fractional determines whether the offset moves the Widget by using its own size as a percentage or by a fixed amount.

Implementation

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