completed velocity integration

This commit is contained in:
2026-05-27 19:01:24 +02:00
parent fec46fb6e9
commit 6fdd3183fb
29 changed files with 2760 additions and 2293 deletions

View File

@@ -1,10 +1,9 @@
import 'package:flutter/material.dart';
import 'package:gif_view/gif_view.dart';
import 'package:qpay/main.dart';
class SplashScreen extends StatefulWidget {
final VoidCallback onSplashComplete;
const SplashScreen({super.key, required this.onSplashComplete});
const SplashScreen({super.key});
@override
State<SplashScreen> createState() => _SplashScreenState();
@@ -57,14 +56,15 @@ class _SplashScreenState extends State<SplashScreen>
// Start fade out animation
await _fadeController.reverse();
// Call the completion callback
// Mark splash complete so GoRouter redirect releases navigation
// to the originally intended route (e.g. /poll/:id).
if (mounted) {
widget.onSplashComplete();
splashState.finish();
}
} catch (e) {
// If there's an error, still complete the splash screen
if (mounted) {
widget.onSplashComplete();
splashState.finish();
}
}
}
@@ -108,4 +108,4 @@ class _SplashScreenState extends State<SplashScreen>
),
);
}
}
}