From a80757da4e6c4378f8b2f752f56a12116db0db44 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 24 Oct 2026 12:58:25 +0200 Subject: [PATCH] After persist the live activity data for welcome11 --- .../welcome/presentation/welcome_screen.dart | 105 ++++++++++-------- 1 file changed, 56 insertions(+), 49 deletions(-) diff --git a/prediqo_mobile/lib/features/welcome/presentation/welcome_screen.dart b/prediqo_mobile/lib/features/welcome/presentation/welcome_screen.dart index 86c8ca12..2cffc615 100644 --- a/prediqo_mobile/lib/features/welcome/presentation/welcome_screen.dart +++ b/prediqo_mobile/lib/features/welcome/presentation/welcome_screen.dart @@ -1,6 +1,7 @@ import 'dart:async'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_animate/flutter_animate.dart'; import 'package:go_router/go_router.dart'; import '../../../core/di/injection.dart'; @@ -365,56 +366,50 @@ class _WelcomeScreenState extends State { final isDark = Theme.of(context).brightness == Brightness.dark; final bottomInset = MediaQuery.paddingOf(context).bottom; - // SafeArea keeps OfflineBanner below the status bar (same pattern as AppShell). - return Scaffold( - key: const Key('welcome_screen'), - body: SafeArea( - bottom: false, - child: Column( + // Gradient fills under the status bar; SafeArea only insets AppBar content. + // OfflineBanner stays sticky below the chrome (outside the scroll view). + return AnnotatedRegion( + value: const SystemUiOverlayStyle( + statusBarColor: Colors.transparent, + statusBarIconBrightness: Brightness.light, + statusBarBrightness: Brightness.dark, + ), + child: Scaffold( + key: const Key('welcome_screen'), + body: Column( children: [ - OfflineBanner(controller: sl()), - Expanded( - child: RefreshIndicator( - onRefresh: () => _load(force: true), - child: CustomScrollView( - physics: const AlwaysScrollableScrollPhysics( - parent: BouncingScrollPhysics(), - ), - slivers: [ - SliverAppBar( - pinned: true, - floating: false, - centerTitle: false, - expandedHeight: 0, - backgroundColor: Colors.transparent, - flexibleSpace: Container( - decoration: const BoxDecoration( - gradient: LinearGradient( - begin: Alignment.topLeft, - end: Alignment.bottomRight, - colors: [ - Color(0xFF059669), - Color(0xFF047857), - Color(0xFF0F172A), - ], + DecoratedBox( + decoration: const BoxDecoration( + gradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: [ + Color(0xFF059669), + Color(0xFF047857), + Color(0xFF0F172A), + ], + ), + ), + child: SafeArea( + bottom: false, + child: SizedBox( + height: kToolbarHeight, + child: Padding( + padding: const EdgeInsets.only(left: 16, right: 4), + child: Row( + children: [ + const PrediqoLogo(size: 28, showWordmark: false), + const SizedBox(width: 10), + Text( + s.appName, + style: const TextStyle( + fontWeight: FontWeight.w900, + letterSpacing: 0.4, + color: Colors.white, + fontSize: 20, ), ), - ), - title: Row( - children: [ - const PrediqoLogo(size: 28, showWordmark: false), - const SizedBox(width: 10), - Text( - s.appName, - style: const TextStyle( - fontWeight: FontWeight.w900, - letterSpacing: 0.4, - color: Colors.white, - ), - ), - ], - ), - actions: [ + const Spacer(), const LanguageToggleButton(), IconButton( key: const Key('welcome_app_update'), @@ -433,9 +428,21 @@ class _WelcomeScreenState extends State { ), ), ), - const SizedBox(width: 4), ], ), + ), + ), + ), + ), + OfflineBanner(controller: sl()), + Expanded( + child: RefreshIndicator( + onRefresh: () => _load(force: true), + child: CustomScrollView( + physics: const AlwaysScrollableScrollPhysics( + parent: BouncingScrollPhysics(), + ), + slivers: [ SliverPadding( padding: EdgeInsets.fromLTRB(20, 12, 20, 24 + bottomInset), sliver: SliverList( @@ -671,7 +678,7 @@ class _WelcomeScreenState extends State { ), ), ), - ], + ], ), ), );