Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
Mobile App
Manage
Activity
Members
Labels
Plan
Issues
3
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Code
Mobile App
Merge requests
!1
Mobile app initial implementation.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Mobile app initial implementation.
3-android-mobile-app-web-view
into
master
Overview
0
Commits
37
Pipelines
0
Changes
86
Merged
Igor Markin
requested to merge
3-android-mobile-app-web-view
into
master
5 years ago
Overview
0
Commits
37
Pipelines
0
Changes
4
Expand
Closes
#3 (closed)
0
0
Merge request reports
Viewing commit
222a16e6
Prev
Next
Show latest version
4 files
+
100
−
30
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
222a16e6
Use custom splash screen.
· 222a16e6
Markin Igor
authored
5 years ago
lib/src/screens/splashscreen.dart
0 → 100644
+
80
−
0
Options
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