import "package:flutter/cupertino.dart";

class FadeRoute extends PageRouteBuilder {
  FadeRoute({required this.builder})
      : super(
          pageBuilder: (
            context,
            animation,
            secondaryAnimation,
          ) =>
              builder(context),
          transitionsBuilder: (
            context,
            animation,
            secondaryAnimation,
            child,
          ) =>
              FadeTransition(
            opacity: animation,
            child: child,
          ),
        );

  final WidgetBuilder builder;
}
