feat: splash page done

This commit is contained in:
jahongireshonqulov
2025-10-31 12:29:30 +05:00
parent ab1ac6e6fa
commit 077ea23416
229 changed files with 3187 additions and 13517 deletions

View File

@@ -0,0 +1,10 @@
import '../../../../../food_delivery_client.dart';
class OnboardingPage extends StatelessWidget {
const OnboardingPage({super.key});
@override
Widget build(BuildContext context) {
return WLayout(child: Scaffold());
}
}

View File

@@ -0,0 +1,55 @@
import 'package:food_delivery_client/feature/onboarding/presentation/blocs/splash_bloc/splash_bloc.dart';
import '../../../../../food_delivery_client.dart';
class SplashPage extends StatelessWidget {
const SplashPage({super.key});
@override
Widget build(BuildContext context) {
return BlocProvider(
create: (context) => sl<SplashBloc>()..add(SplashEvent.started()),
child: BlocListener<SplashBloc, SplashState>(
listener: (context, state) {
if (state.status.isError()) {
context.go(Routes.onBoarding);
}
},
child: WLayout(
bottom: false,
top: false,
child: Scaffold(
body: Stack(
children: [
Positioned.fill(
child: SvgPicture.asset(context.appThemeIcons.icSplash),
),
Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Center(child: SvgPicture.asset(AppIcons.icLogo)),
ShaderMask(
shaderCallback: (bounds) =>
const LinearGradient(
begin: AlignmentGeometry.bottomCenter,
end: AlignmentGeometry.topCenter,
colors: [AppColors.cFF6F00, AppColors.cFFAB40],
).createShader(
Rect.fromLTWH(0, 0, bounds.width, bounds.height),
),
child: Text(
"Felix Eats",
style: context.appThemeTextStyles.size64Black,
),
),
],
),
],
),
),
),
),
);
}
}