Files
SashegDev 2347f382c6 сборка: APK (Android) + Linux Desktop
- Исправлены ошибки Flutter анализа (withOpacity, pbkdf2, импорты)
- Упрощён pubspec.yaml (только нужные зависимости)
- Android APK собран: build/app/outputs/flutter-apk/app-release.apk (22MB)
- Linux Desktop собран: build/linux/x64/release/bundle/jam_client

Для Windows: кросс-компиляция невозможна с Linux.
Нужен Windows хост для flutter build windows.
2026-06-06 23:07:57 +00:00

111 lines
3.3 KiB
Dart

import 'package:flutter/material.dart';
import '../services/theme_service.dart';
class SplashScreen extends StatefulWidget {
const SplashScreen({super.key});
@override
State<SplashScreen> createState() => _SplashScreenState();
}
class _SplashScreenState extends State<SplashScreen>
with SingleTickerProviderStateMixin {
late AnimationController _controller;
late Animation<double> _fadeIn;
late Animation<double> _scale;
@override
void initState() {
super.initState();
_controller = AnimationController(
vsync: this,
duration: const Duration(milliseconds: 1500),
);
_fadeIn = Tween<double>(begin: 0, end: 1).animate(
CurvedAnimation(parent: _controller, curve: Curves.easeInOut),
);
_scale = Tween<double>(begin: 0.8, end: 1).animate(
CurvedAnimation(parent: _controller, curve: Curves.elasticOut),
);
_controller.forward();
Future.delayed(const Duration(seconds: 2), () {
if (mounted) Navigator.pushReplacementNamed(context, '/login');
});
}
@override
void dispose() {
_controller.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: ThemeService.backgroundPrimary,
body: Center(
child: AnimatedBuilder(
animation: _controller,
builder: (context, child) => Opacity(
opacity: _fadeIn.value,
child: Transform.scale(
scale: _scale.value,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Container(
width: 100,
height: 100,
decoration: BoxDecoration(
color: ThemeService.primary,
borderRadius: BorderRadius.circular(24),
boxShadow: [
BoxShadow(
color: ThemeService.primary.withOpacity(0.4),
blurRadius: 30,
spreadRadius: 5,
),
],
),
child: const Center(
child: Text(
'JAM',
style: TextStyle(
color: Colors.white,
fontSize: 36,
fontWeight: FontWeight.w800,
letterSpacing: 2,
),
),
),
),
const SizedBox(height: 24),
const Text(
'JustAMessenger',
style: TextStyle(
color: ThemeService.textPrimary,
fontSize: 28,
fontWeight: FontWeight.w700,
letterSpacing: 1,
),
),
const SizedBox(height: 8),
Text(
'Lightweight · Decentralized · Secure',
style: TextStyle(
color: ThemeService.textSecondary.withOpacity(0.7),
fontSize: 14,
letterSpacing: 0.5,
),
),
],
),
),
),
),
),
);
}
}