After persist the live activity data for welcome11

This commit is contained in:
Your Name 2026-10-24 12:58:25 +02:00
parent 95762e4204
commit a80757da4e

View File

@ -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<WelcomeScreen> {
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<SystemUiOverlayStyle>(
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<ConnectivityController>()),
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<WelcomeScreen> {
),
),
),
const SizedBox(width: 4),
],
),
),
),
),
),
OfflineBanner(controller: sl<ConnectivityController>()),
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<WelcomeScreen> {
),
),
),
],
],
),
),
);