35 lines
898 B
Dart
35 lines
898 B
Dart
|
|
import 'package:get/get.dart';
|
|
import 'package:skywood/pages/splash/splash_page.dart';
|
|
|
|
class SkyRouters {
|
|
static const String splash = '/splash';
|
|
}
|
|
|
|
class SkyPages {
|
|
static const initial = SkyRouters.splash;
|
|
|
|
static final List<GetPage> routes = [
|
|
routePage(name: SkyRouters.splash, page: ()=> SplashPage())
|
|
];
|
|
}
|
|
|
|
GetPage routePage({
|
|
required String name,
|
|
required GetPageBuilder page,
|
|
Bindings? binding,
|
|
Transition transition = Transition.rightToLeft,
|
|
Duration transitionDuration = const Duration(milliseconds: 300),
|
|
CustomTransition? customTransition,
|
|
bool popGesture = true, // Allow iOS swipe-back gesture by default
|
|
}) {
|
|
return GetPage(
|
|
name: name,
|
|
page: page,
|
|
binding: binding,
|
|
transition: transition,
|
|
transitionDuration: transitionDuration,
|
|
customTransition: customTransition,
|
|
popGesture: popGesture, // Pass through to GetPage
|
|
);
|
|
} |