Backup before removing hiddify references

This commit is contained in:
Hiddify User
2026-01-15 12:28:40 +03:00
parent f54603d129
commit 36d9e31236
231 changed files with 6648 additions and 1832 deletions

View File

@@ -0,0 +1,82 @@
import 'dart:math' as math;
import 'package:flutter/material.dart';
class CustomSplashScreen extends StatefulWidget {
const CustomSplashScreen({
super.key,
required this.onInitializationComplete,
});
final VoidCallback onInitializationComplete;
@override
State<CustomSplashScreen> createState() => _CustomSplashScreenState();
}
class _CustomSplashScreenState extends State<CustomSplashScreen> with SingleTickerProviderStateMixin {
late AnimationController _controller;
@override
void initState() {
super.initState();
_controller = AnimationController(
duration: const Duration(seconds: 2),
vsync: this,
)..repeat();
// Имитируем время загрузки, затем вызываем callback
Future.delayed(const Duration(milliseconds: 100), () {
if (mounted) {
widget.onInitializationComplete();
}
});
}
@override
void dispose() {
_controller.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
// UMBRIX: Всегда используем темную тему для splash screen
const isDark = true;
return Material(
color: const Color(0xFF191f23),
child: Center(
child: Stack(
alignment: Alignment.center,
children: [
// Крутящийся индикатор
AnimatedBuilder(
animation: _controller,
builder: (context, child) {
return Transform.rotate(
angle: _controller.value * 2 * math.pi,
child: const SizedBox(
width: 120,
height: 120,
child: CircularProgressIndicator(
strokeWidth: 6,
valueColor: AlwaysStoppedAnimation<Color>(
Color(0xFF2fbea5),
),
),
),
);
},
),
// Логотип в центре
Image.asset(
'assets/images/logo_splash.png',
width: 80,
height: 80,
),
],
),
),
);
}
}