Fixing splash Screen landscape design

updates_new
hussam al-habibeh 4 years ago
parent 362def99f0
commit b354934ba3

@ -34,9 +34,13 @@ class _SplashScreenPageState extends State<SplashScreenPage> {
body: Container( body: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
gradient: LinearGradient( gradient: LinearGradient(
begin: Alignment(1.0,0.0), begin: Alignment(1.0, 0.0),
end: Alignment(-0.0, 0.0), // 10% of the width, so there are ten blinds. end: Alignment(
colors: [const Color(0xFF1BB0B8), const Color(0xFF44BFBB)],//[const Color(0xff30B7B9), const Color(0xff3AB2AD)], // whitish to gray -0.0, 0.0), // 10% of the width, so there are ten blinds.
colors: [
const Color(0xFF1BB0B8),
const Color(0xFF44BFBB)
], //[const Color(0xff30B7B9), const Color(0xff3AB2AD)], // whitish to gray
tileMode: TileMode.clamp, // repeats the gradient over the canvas tileMode: TileMode.clamp, // repeats the gradient over the canvas
), ),
), ),
@ -45,19 +49,25 @@ class _SplashScreenPageState extends State<SplashScreenPage> {
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[ children: <Widget>[
FractionallySizedBox( FractionallySizedBox(
widthFactor: 0.80, widthFactor: 0.89,
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
SizedBox( SizedBox(
height: 200, height: MediaQuery.of(context).orientation ==
Orientation.portrait
? 200
: 50,
), ),
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Container( Container(
child: Icon( child: Icon(
DriverApp.logo, DriverApp.logo,
size: 120, size: MediaQuery.of(context).orientation ==
Orientation.portrait
? 120
: 70,
color: Colors.white, color: Colors.white,
), ),
margin: EdgeInsets.only( margin: EdgeInsets.only(
@ -65,42 +75,64 @@ class _SplashScreenPageState extends State<SplashScreenPage> {
? 0 ? 0
: MediaQuery.of(context).size.width * 0.20, : MediaQuery.of(context).size.width * 0.20,
left: !projectViewModel.isArabic left: !projectViewModel.isArabic
? 0 ? MediaQuery.of(context).orientation ==
Orientation.landscape
? MediaQuery.of(context).size.width * 0.13
: MediaQuery.of(context).size.width * 0.0
: MediaQuery.of(context).size.width * 0.10), : MediaQuery.of(context).size.width * 0.10),
), ),
], ],
), ),
SizedBox( SizedBox(
height: 20, height: MediaQuery.of(context).orientation ==
Orientation.portrait
? 20
: 15,
), ),
Column( Column(
children: <Widget>[ children: <Widget>[
Text( Text(
"Driver", "Driver",
style: TextStyle( style: TextStyle(
fontSize: 70, fontSize: MediaQuery.of(context).orientation ==
Orientation.portrait
? 70
: 35,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Colors.white), color: Colors.white),
), ),
Text( Text(
"Delivery", "Delivery",
style: TextStyle( style: TextStyle(
fontSize: 50, fontSize: MediaQuery.of(context).orientation ==
Orientation.portrait
? 50
: 25,
letterSpacing: 1, letterSpacing: 1,
color: Colors.white), color: Colors.white),
), ),
Text( Text(
"APP", "APP",
style: TextStyle( style: TextStyle(
fontSize: 53, fontSize: MediaQuery.of(context).orientation ==
letterSpacing: 53, Orientation.portrait
? 53
: 21,
letterSpacing:
MediaQuery.of(context).orientation ==
Orientation.portrait
? 53
: 27,
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.w400), fontWeight: FontWeight.w400),
), ),
], ],
), ),
SizedBox( SizedBox(
height: 100, height: MediaQuery.of(context).orientation ==
Orientation.portrait
? 100
: 50,
) )
], ],
), ),
@ -129,7 +161,10 @@ class _SplashScreenPageState extends State<SplashScreenPage> {
), ),
), ),
SizedBox( SizedBox(
height: 10, height: MediaQuery.of(context).orientation ==
Orientation.portrait
? 10
: 5,
) )
], ],
), ),

Loading…
Cancel
Save