test
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Modify this file to customize your launch splash screen -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="?android:colorBackground" />
|
||||
<item android:drawable="@android:color/white" />
|
||||
|
||||
<!-- You can insert your own image assets here -->
|
||||
<item>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<item android:drawable="@android:color/white" />
|
||||
|
||||
<!-- You can insert your own image assets here -->
|
||||
<item>
|
||||
<item>
|
||||
<bitmap
|
||||
android:gravity="center"
|
||||
android:src="@mipmap/splash" />
|
||||
|
||||
|
After Width: | Height: | Size: 2.2 MiB |
|
After Width: | Height: | Size: 2.2 MiB |
|
Before Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 2.2 MiB |
|
After Width: | Height: | Size: 2.2 MiB |
|
After Width: | Height: | Size: 2.2 MiB |
|
After Width: | Height: | Size: 2.2 MiB |
@@ -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,
|
||||
@@ -9,6 +9,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.3"
|
||||
animated_splash_screen:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: animated_splash_screen
|
||||
sha256: f45634db6ec4e8cf034c53e03f3bd83898a16fe3c9286bf5510b6831dfcf2124
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.0"
|
||||
args:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -824,6 +832,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
page_transition:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: page_transition
|
||||
sha256: a7694bc120b7064a7f57c336914bb8885acf4f70bb3772c30c2fcfe6a85e43ff
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.9"
|
||||
path:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
||||
@@ -69,6 +69,7 @@ dependencies:
|
||||
firebase_messaging: ^14.6.3
|
||||
awesome_notifications: ^0.7.4+1
|
||||
audioplayers: ^4.1.0
|
||||
animated_splash_screen: ^1.3.0
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
||||