38 duration:
const Duration(milliseconds: 1500),
43 duration:
const Duration(milliseconds: 2000),
48 duration:
const Duration(milliseconds: 800),
53 tween: Tween<double>(begin: 0.0, end: 1.2)
54 .chain(CurveTween(curve: Curves.easeOut)),
58 tween: Tween<double>(begin: 1.2, end: 1.0)
59 .chain(CurveTween(curve: Curves.easeInOut)),
70 curve: Curves.easeInOut,
102 Widget
build(BuildContext context) {
103 return MultiBlocListener(
105 BlocListener<AuthenticationBloc, AuthenticationState>(
106 listener: (listenerContext, state) async {
107 if (state is AuthenticatedState) {
112 final userRole = state.session.role;
113 if (userRole != null && userRole !=
"Driver") {
114 if (listenerContext.mounted) {
115 context.go(
Routes.driverRequestsScreen.route);
121 if (listenerContext.mounted){
122 if(checkIn ==
false) {
123 context.go(
Routes.checkInScreen.route);
126 final now = DateTime.now();
127 final dateString =
'${now.day.toString().padLeft(2, '0
')}/${now.month.toString().padLeft(2, '0
')}/${now.year}';
134 }
else if (state is UnauthenticatedState) {
135 context.go(
Routes.signInScreen.route);
139 BlocListener<HomeBloc, HomeState>(
140 listener: (listenerContext, state) {
143 context.go(
Routes.startLocationChooserScreen.route);
145 context.go(
Routes.homeScreen.route);
147 context.go(
Routes.scheduleConfirmationScreen.route);
149 }
else if (state is ScheduleStatusError) {
150 context.go(
Routes.homeScreen.route);
156 body: AnimatedBuilder(
157 animation: Listenable.merge([
162 builder: (context,
child) {
166 duration: const Duration(milliseconds: 1500),
167 decoration: BoxDecoration(
168 gradient: LinearGradient(
169 begin: Alignment.topLeft,
170 end: Alignment.bottomRight,
172 ColorPalette.darkGreen,
174 ColorPalette.darkGreen,
175 ColorPalette.lightGreen,
176 _backgroundAnimation.value,
185 opacity: _fadeAnimation.value * 0.7,
187 painter: SplashScreenCirclesPainter(
188 progress: _backgroundAnimation.value,
195 child: Transform.scale(
196 scale: _logoScaleAnimation.value,
197 child: FadeTransition(
198 opacity: _fadeAnimation,
199 child: SvgPicture.asset(
201 colorFilter: const ColorFilter.mode(
215 child: FadeTransition(
216 opacity: _fadeAnimation,
221 'Sustainability Matters',
223 fontStyle: FontStyle.italic,
224 color: ColorPalette.white.withValues(alpha: 0.8),
239 child: FadeTransition(
240 opacity: _fadeAnimation,
244 child: LinearProgressIndicator(
245 value: _backgroundAnimation.value,
246 backgroundColor: ColorPalette.white.withValues(alpha: 0.2),
247 valueColor: const AlwaysStoppedAnimation<Color>(
250 borderRadius: BorderRadius.circular(10),