Skip to content

Commit

Permalink
Merge pull request #13 from bmabir17/feat_add_splashScreen
Browse files Browse the repository at this point in the history
splash screen added
  • Loading branch information
bmabir17 authored Apr 7, 2020
2 parents dfa826f + 421aa5b commit e213f2a
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 3 deletions.
30 changes: 28 additions & 2 deletions lib/app.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import "package:tran_dao/ui/reliefMapPage.dart";

import 'package:splashscreen/splashscreen.dart';

class TranDao extends StatefulWidget {
@override
Expand All @@ -12,7 +12,7 @@ class _TranDaoState extends State<TranDao> {
Widget build(BuildContext context) {
dynamic _initPage;

_initPage=ReliefMapPage();
_initPage=MySplashScreen();

return MaterialApp(
home: _initPage,
Expand All @@ -31,4 +31,30 @@ class _TranDaoState extends State<TranDao> {
},
);
}
}
// https://pub.dev/packages/splashscreen#-readme-tab-
class MySplashScreen extends StatefulWidget{

_MySplashScreenState createState() => new _MySplashScreenState();
}

class _MySplashScreenState extends State<MySplashScreen> {
Widget build(BuildContext context){
return new SplashScreen(
seconds: 5,
navigateAfterSeconds: new ReliefMapPage(),
title: new Text('ত্রান দাও',
style: new TextStyle(
fontWeight: FontWeight.bold,
fontSize: 35.0,
),),
backgroundColor: Colors.white,
styleTextUnderTheLoader: new TextStyle(),
photoSize: 100.0,
onClick: ()=>print("Flutter BD"),
loaderColor: Colors.green
);

}

}
7 changes: 7 additions & 0 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.5"
splashscreen:
dependency: "direct main"
description:
name: splashscreen
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
stack_trace:
dependency: transitive
description:
Expand Down
3 changes: 2 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ dependencies:
google_maps_flutter_heatmap: ^0.1.1+1
geolocator: ^5.3.1
firebase_core: ^0.4.0+9
cloud_firestore: ^0.13.0+1
cloud_firestore: ^0.13.0+1
splashscreen: ^1.2.0


# The following adds the Cupertino Icons font to your application.
Expand Down

0 comments on commit e213f2a

Please sign in to comment.