This repository has been archived on 2023-08-16. You can view files and clone it, but cannot push or open issues or pull requests.
LocalSpend-Tracker/lib/pages/spash_screen.dart

63 lines
1.7 KiB
Dart
Raw Permalink Normal View History

import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:local_spend/common/platform/platform_scaffold.dart';
class SplashScreen extends StatefulWidget {
@override
_SplashScreenState createState() => _SplashScreenState();
}
class _SplashScreenState extends State<SplashScreen> {
2019-07-18 13:28:34 +00:00
final int splashDuration = 1;
startTime() async {
return Timer(Duration(seconds: splashDuration), () {
SystemChannels.textInput.invokeMethod('TextInput.hide');
Navigator.of(context).pushReplacementNamed('/LoginPage');
});
}
@override
void initState() {
super.initState();
startTime();
}
@override
Widget build(BuildContext context) {
var drawer = Drawer();
return PlatformScaffold(
drawer: drawer,
body: Container(
decoration: BoxDecoration(color: Colors.white),
child: Column(
children: <Widget>[
Expanded(
child: Container(
margin: EdgeInsets.all(15),
alignment: FractionalOffset(0.5, 0.3),
decoration: BoxDecoration(
2019-07-09 09:26:33 +00:00
image: DecorationImage(
image: AssetImage('assets/images/launch_image.png')
),
),
),
),
Container(
margin: EdgeInsets.fromLTRB(0.0, 0.0, 0.0, 30.0),
child: Text(
2019-07-15 15:17:41 +00:00
"© Copyright Statement 2019",
style: TextStyle(
fontSize: 16.0,
color: Colors.black,
),
),
),
],
)));
}
}