-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathloading.dart
More file actions
46 lines (39 loc) · 1.12 KB
/
Copy pathloading.dart
File metadata and controls
46 lines (39 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// ignore_for_file: avoid_print, use_build_context_synchronously
import 'package:flutter/material.dart';
import 'package:flutter_spinkit/flutter_spinkit.dart';
class Loading extends StatefulWidget {
const Loading({super.key});
@override
State<Loading> createState() => _LoadingState();
}
class _LoadingState extends State<Loading> {
void loadtime() async {
await Future.delayed(const Duration(seconds: 5), (() {}));
Navigator.pushReplacementNamed(context,'/login');
}
@override
void initState(){
super.initState();
loadtime();
}
@override
Widget build(BuildContext context) {
return Scaffold(
body: Container(
width: double.infinity,
height: double.infinity,
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/image/wynk-music-first.webp'),
fit: BoxFit.fill,
)),
child: const Center(
child: SpinKitRing(
color: Color.fromARGB(255, 95, 95, 95),
size: 100.0,
),
),
),
);
}
}