Resolve all lints and deprecation warnings

This commit is contained in:
2026-01-09 10:04:51 -06:00
parent 512577b092
commit a799e9cf59
56 changed files with 2819 additions and 3159 deletions

View File

@@ -9,13 +9,15 @@ import '../providers/user_provider.dart';
import 'husband/husband_home_screen.dart';
class SplashScreen extends ConsumerStatefulWidget {
const SplashScreen({super.key});
final bool isStartup;
const SplashScreen({super.key, this.isStartup = false});
@override
ConsumerState<SplashScreen> createState() => _SplashScreenState();
}
class _SplashScreenState extends ConsumerState<SplashScreen> with SingleTickerProviderStateMixin {
class _SplashScreenState extends ConsumerState<SplashScreen>
with SingleTickerProviderStateMixin {
late AnimationController _controller;
late Animation<double> _fadeAnimation;
late Animation<double> _scaleAnimation;
@@ -44,16 +46,18 @@ class _SplashScreenState extends ConsumerState<SplashScreen> with SingleTickerPr
_controller.forward();
// Navigate after splash
Future.delayed(const Duration(milliseconds: 1200), () {
_navigateToNextScreen();
});
// Navigate after splash ONLY if not managed by AppStartupWidget
if (!widget.isStartup) {
Future.delayed(const Duration(milliseconds: 1200), () {
_navigateToNextScreen();
});
}
}
void _navigateToNextScreen() {
final user = ref.read(userProfileProvider);
final hasProfile = user != null;
Widget nextScreen;
if (!hasProfile) {
nextScreen = const OnboardingScreen();
@@ -103,7 +107,7 @@ class _SplashScreenState extends ConsumerState<SplashScreen> with SingleTickerPr
gradient: LinearGradient(
colors: [
AppColors.blushPink,
AppColors.rose.withOpacity(0.8),
AppColors.rose.withValues(alpha: 0.8),
],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
@@ -111,7 +115,7 @@ class _SplashScreenState extends ConsumerState<SplashScreen> with SingleTickerPr
borderRadius: BorderRadius.circular(30),
boxShadow: [
BoxShadow(
color: AppColors.rose.withOpacity(0.3),
color: AppColors.rose.withValues(alpha: 0.3),
blurRadius: 20,
offset: const Offset(0, 10),
),
@@ -124,7 +128,7 @@ class _SplashScreenState extends ConsumerState<SplashScreen> with SingleTickerPr
),
),
const SizedBox(height: 24),
// App Name placeholder
Text(
'Period Tracker',
@@ -135,7 +139,7 @@ class _SplashScreenState extends ConsumerState<SplashScreen> with SingleTickerPr
),
),
const SizedBox(height: 8),
// Tagline
Text(
'Faith-Centered Wellness',
@@ -147,7 +151,7 @@ class _SplashScreenState extends ConsumerState<SplashScreen> with SingleTickerPr
),
),
const SizedBox(height: 48),
// Scripture
Padding(
padding: const EdgeInsets.symmetric(horizontal: 48),