mirrored_repositories/Ubuntu-Launcher/lib/src/helpers
import 'package:flutter/material.dart';

class RouteAnimator {
  static Route createRoute(Widget home) {
    {
      return PageRouteBuilder(
        opaque: false,
        pageBuilder: (context, animation, secondaryAnimation) => home,
        transitionsBuilder: (context, a1, a2, widget) {
          return Transform.scale(
            scale: a1.value,
            child: Opacity(
              opacity: a1.value,
              child: widget,
            ),
          );
        },
        transitionDuration: Duration(milliseconds: 300),
        barrierDismissible: true,
        barrierLabel: '',
      );
    }
  }
}
