import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';

import '../config.dart';
import '../animations/slide.dart';

GoRoute animationRoute({
  required String path,
  required Widget child,
}) {
  return GoRoute(
    path: path,
    pageBuilder: (context, state) => CustomTransitionPage(
      key: state.pageKey,
      child: child,
      transitionDuration: AppAnimationConfig.duration,
      transitionsBuilder: slideTransition,
    ),
  );
}