2024-04-03 21:55:49 -04:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
|
|
import 'package:radix_colors/radix_colors.dart';
|
|
|
|
|
|
|
|
import '../tools/tools.dart';
|
|
|
|
|
|
|
|
class Splash extends StatefulWidget {
|
|
|
|
const Splash({super.key});
|
|
|
|
|
|
|
|
@override
|
|
|
|
State<Splash> createState() => _SplashState();
|
|
|
|
}
|
|
|
|
|
|
|
|
class _SplashState extends State<Splash> {
|
|
|
|
@override
|
|
|
|
void initState() {
|
|
|
|
super.initState();
|
|
|
|
|
|
|
|
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
|
|
|
await changeWindowSetup(
|
|
|
|
TitleBarStyle.hidden, OrientationCapability.normal);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
2024-04-05 22:03:04 -04:00
|
|
|
Widget build(BuildContext context) => PopScope(
|
|
|
|
canPop: false,
|
|
|
|
child: DecoratedBox(
|
2024-04-03 21:55:49 -04:00
|
|
|
decoration: BoxDecoration(
|
|
|
|
gradient: LinearGradient(
|
|
|
|
begin: Alignment.topCenter,
|
|
|
|
end: Alignment.bottomCenter,
|
|
|
|
colors: <Color>[
|
|
|
|
RadixColors.dark.plum.step4,
|
|
|
|
RadixColors.dark.plum.step2,
|
|
|
|
])),
|
|
|
|
child: Center(
|
|
|
|
child: ConstrainedBox(
|
|
|
|
constraints: const BoxConstraints(maxHeight: 300),
|
|
|
|
child: Column(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
// Splash Screen
|
|
|
|
Expanded(
|
|
|
|
flex: 2,
|
|
|
|
child: SvgPicture.asset(
|
|
|
|
'assets/images/icon.svg',
|
|
|
|
)),
|
|
|
|
Expanded(
|
|
|
|
child: SvgPicture.asset(
|
|
|
|
'assets/images/title.svg',
|
|
|
|
))
|
|
|
|
]))),
|
2024-04-05 22:03:04 -04:00
|
|
|
));
|
2024-04-03 21:55:49 -04:00
|
|
|
}
|