mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2026-10-23 14:17:55 +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:
@@ -2,8 +2,10 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:syncrow_app/features/auth/bloc/auth_cubit.dart';
|
||||
import 'package:syncrow_app/features/auth/view/widgets/login/login_view.dart';
|
||||
import 'package:syncrow_app/generated/assets.dart';
|
||||
import 'package:syncrow_app/navigation/routing_constants.dart';
|
||||
import 'package:syncrow_app/utils/helpers/custom_page_route.dart';
|
||||
|
||||
class SplashView extends StatelessWidget {
|
||||
const SplashView({super.key});
|
||||
@@ -18,7 +20,10 @@ class SplashView extends StatelessWidget {
|
||||
});
|
||||
} else {
|
||||
Future.delayed(const Duration(seconds: 1), () {
|
||||
Navigator.pushReplacementNamed(context, Routes.authLogin);
|
||||
Navigator.pushReplacement(
|
||||
context,
|
||||
CustomPageRoute(builder: (context) => const LoginView()),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user