criada tela_splash.dart
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||||
import 'package:rkm_educa_app/telas/tela_login.dart';
|
import 'package:rkm_educa_app/telas/tela_splash.dart';
|
||||||
|
|
||||||
class PostHttpOverrides extends HttpOverrides{
|
class PostHttpOverrides extends HttpOverrides{
|
||||||
@override
|
@override
|
||||||
@@ -32,7 +32,7 @@ class MyApp extends StatelessWidget {
|
|||||||
],
|
],
|
||||||
debugShowCheckedModeBanner: false,
|
debugShowCheckedModeBanner: false,
|
||||||
locale: const Locale('pt'),
|
locale: const Locale('pt'),
|
||||||
home: TelaLogin(),
|
home: TelaSplash(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,9 +75,6 @@ class _TelaLoginState extends State<TelaLogin> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
||||||
Dimensoes().init(context);
|
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: PaletaCores.branco,
|
backgroundColor: PaletaCores.branco,
|
||||||
body: Center(
|
body: Center(
|
||||||
|
|||||||
44
lib/telas/tela_splash.dart
Normal file
44
lib/telas/tela_splash.dart
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:rkm_educa_app/telas/tela_login.dart';
|
||||||
|
import 'package:rkm_educa_app/utils/cores.dart';
|
||||||
|
import '../utils/dimensoes.dart';
|
||||||
|
|
||||||
|
class TelaSplash extends StatefulWidget {
|
||||||
|
const TelaSplash({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<TelaSplash> createState() => _TelaSplashState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _TelaSplashState extends State<TelaSplash> {
|
||||||
|
|
||||||
|
carregar()async{
|
||||||
|
Future.delayed(Duration(seconds: 3),(){
|
||||||
|
Navigator.pushReplacement(context, MaterialPageRoute(builder: (context)=>TelaLogin()));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
carregar();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
Dimensoes().init(context);
|
||||||
|
return Scaffold(
|
||||||
|
body: Center(
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
child: Image.asset("assets/images/logoEduca.png",width:Dimensoes.width * 0.4,height: Dimensoes.height * 0.15)
|
||||||
|
),
|
||||||
|
CircularProgressIndicator(color: PaletaCores.cinzaClaro,)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user