test
This commit is contained in:
+44
-2
@@ -1,3 +1,5 @@
|
||||
import 'package:animated_splash_screen/animated_splash_screen.dart';
|
||||
import 'package:audioplayers/audioplayers.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -73,7 +75,6 @@ void main() async {
|
||||
]);
|
||||
usePathUrlStrategy();
|
||||
runApp(const MyApp());
|
||||
|
||||
}
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
@@ -85,8 +86,9 @@ class MyApp extends StatelessWidget {
|
||||
theme: ThemeData(fontFamily: 'Poppins'),
|
||||
debugShowCheckedModeBanner: false,
|
||||
title: 'ProsApp',
|
||||
initialRoute: '/',
|
||||
initialRoute: '/splash',
|
||||
routes: {
|
||||
'/splash': (context) => const SplashScreen(),
|
||||
'/': (context) => const LoginScreen(),
|
||||
'/login': (context) => const LoginEmailScreen(),
|
||||
'/profile': (context) => const ProfileScreen(),
|
||||
@@ -111,3 +113,43 @@ class MyApp extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class SplashScreen extends StatefulWidget {
|
||||
const SplashScreen({super.key});
|
||||
|
||||
@override
|
||||
State<SplashScreen> createState() => _SplashScreenState();
|
||||
}
|
||||
|
||||
class _SplashScreenState extends State<SplashScreen> {
|
||||
// AudioPlayer audioPlayer = AudioPlayer();
|
||||
|
||||
// @override
|
||||
// void initState() {
|
||||
// super.initState();
|
||||
// playSound();
|
||||
// }
|
||||
|
||||
// void playSound() async {
|
||||
// await audioPlayer.play(UrlSource('images/sonido.mp3'));
|
||||
// }
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AnimatedSplashScreen.withScreenFunction(
|
||||
splash: 'images/splashgif.gif',
|
||||
screenFunction: () async {
|
||||
return const LoginScreen();
|
||||
},
|
||||
splashTransition: SplashTransition.rotationTransition,
|
||||
duration: 80000,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// splash: 'images/splashgif.gif',
|
||||
// backgroundColor: Colors.black,
|
||||
// nextScreen: const LoginScreen(),
|
||||
// splashIconSize: 50,
|
||||
// duration: 80000,
|
||||
Reference in New Issue
Block a user