Skip to content
Snippets Groups Projects

Mobile app initial implementation.

Merged Igor Markin requested to merge 3-android-mobile-app-web-view into master
4 files
+ 100
30
Compare changes
  • Side-by-side
  • Inline
Files
4
+ 80
0
import 'dart:core';
import 'dart:async';
import 'package:flutter/material.dart';
class SplashScreen extends StatefulWidget {
final dynamic navigateAfterFuture;
SplashScreen({this.navigateAfterFuture});
@override
_SplashScreenState createState() => _SplashScreenState();
}
class _SplashScreenState extends State<SplashScreen> {
@override
void initState() {
super.initState();
load();
}
load() async {
var newWidget = await widget.navigateAfterFuture();
// Show loader additional 2 seconds
Timer(
Duration(seconds: 1),
() {
Navigator.of(context).pushReplacement(new MaterialPageRoute(builder: (BuildContext context) => newWidget));
}
);
}
@override
Widget build(BuildContext context) {
return Scaffold(
body: new InkWell(
child:new Stack(
fit: StackFit.expand,
children: <Widget>[
new Container(
decoration: new BoxDecoration(
color: Color(0xFFd51d32),
),
),
new Column(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
new Expanded(
flex: 2,
child: new Container(
child: new Image.asset('assets/images/vereign_logo_text.png'),
padding: EdgeInsets.all(40)
),
),
Expanded(
flex: 1,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
CircularProgressIndicator(
valueColor: new AlwaysStoppedAnimation<Color>(Colors.white),
),
Padding(
padding: const EdgeInsets.only(top: 20.0),
),
new Text('Loading', style: new TextStyle(
color: Colors.white
))
],
),
),
],
),
],
),
),
);
}
}
Loading