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

GetPageRoute<dynamic> buildRouteFromGetPage(GetPage page) {
  return GetPageRoute(
    page: page.page,
    settings: RouteSettings(name: page.name),
    transition: page.transition,
    curve: page.curve,
    binding: page.binding,
    bindings: page.bindings,
    routeName: page.name,
    title: page.title,
    gestureWidth: page.gestureWidth,
    alignment: page.alignment,
    maintainState: page.maintainState,
    customTransition: page.customTransition,
    transitionDuration: page.transitionDuration ?? const Duration(milliseconds: 300),
    fullscreenDialog: page.fullscreenDialog,
    opaque: page.opaque,
    popGesture: page.popGesture,
    showCupertinoParallax: page.showCupertinoParallax,
  );
}