mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-16 01:56:19 +00:00
Refactor navigation in SplashView and add CustomPageRoute
Introduce CustomPageRoute for smoother navigation transitions in SplashView. Update navigation in SplashView to use CustomPageRoute for login redirection.
This commit is contained in:
@ -1,11 +1,15 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class CustomPageRoute extends MaterialPageRoute {
|
||||
CustomPageRoute({
|
||||
required super.builder,
|
||||
super.settings,
|
||||
});
|
||||
class CustomPageRoute extends PageRouteBuilder {
|
||||
final WidgetBuilder builder;
|
||||
|
||||
@override
|
||||
Duration get transitionDuration => const Duration(milliseconds: 0);
|
||||
CustomPageRoute({required this.builder})
|
||||
: super(
|
||||
pageBuilder: (BuildContext context, Animation<double> animation,
|
||||
Animation<double> secondaryAnimation) {
|
||||
return builder(context);
|
||||
},
|
||||
transitionDuration: Duration.zero,
|
||||
reverseTransitionDuration: Duration.zero,
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user