Skip to content

Commit 07891ae

Browse files
committed
Fix issue #2
1 parent 4560c8e commit 07891ae

File tree

1 file changed

+132
-130
lines changed

1 file changed

+132
-130
lines changed

lib/main.dart

Lines changed: 132 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -13,136 +13,138 @@ class HomePage extends StatelessWidget {
1313
Widget build(BuildContext context) {
1414
return Scaffold(
1515
backgroundColor: Colors.white,
16-
body: Container(
17-
child: Column(
18-
children: <Widget>[
19-
Container(
20-
height: 400,
21-
decoration: BoxDecoration(
22-
image: DecorationImage(
23-
image: AssetImage('assets/images/background.png'),
24-
fit: BoxFit.fill
25-
)
26-
),
27-
child: Stack(
28-
children: <Widget>[
29-
Positioned(
30-
left: 30,
31-
width: 80,
32-
height: 200,
33-
child: FadeAnimation(1, Container(
34-
decoration: BoxDecoration(
35-
image: DecorationImage(
36-
image: AssetImage('assets/images/light-1.png')
37-
)
38-
),
39-
)),
40-
),
41-
Positioned(
42-
left: 140,
43-
width: 80,
44-
height: 150,
45-
child: FadeAnimation(1.3, Container(
46-
decoration: BoxDecoration(
47-
image: DecorationImage(
48-
image: AssetImage('assets/images/light-2.png')
49-
)
50-
),
51-
)),
52-
),
53-
Positioned(
54-
right: 40,
55-
top: 40,
56-
width: 80,
57-
height: 150,
58-
child: FadeAnimation(1.5, Container(
59-
decoration: BoxDecoration(
60-
image: DecorationImage(
61-
image: AssetImage('assets/images/clock.png')
62-
)
63-
),
64-
)),
65-
),
66-
Positioned(
67-
child: FadeAnimation(1.6, Container(
68-
margin: EdgeInsets.only(top: 50),
69-
child: Center(
70-
child: Text("Login", style: TextStyle(color: Colors.white, fontSize: 40, fontWeight: FontWeight.bold),),
71-
),
72-
)),
73-
)
74-
],
75-
),
76-
),
77-
Padding(
78-
padding: EdgeInsets.all(30.0),
79-
child: Column(
80-
children: <Widget>[
81-
FadeAnimation(1.8, Container(
82-
padding: EdgeInsets.all(5),
83-
decoration: BoxDecoration(
84-
color: Colors.white,
85-
borderRadius: BorderRadius.circular(10),
86-
boxShadow: [
87-
BoxShadow(
88-
color: Color.fromRGBO(143, 148, 251, .2),
89-
blurRadius: 20.0,
90-
offset: Offset(0, 10)
91-
)
92-
]
93-
),
94-
child: Column(
95-
children: <Widget>[
96-
Container(
97-
padding: EdgeInsets.all(8.0),
98-
decoration: BoxDecoration(
99-
border: Border(bottom: BorderSide(color: Colors.grey[100]))
100-
),
101-
child: TextField(
102-
decoration: InputDecoration(
103-
border: InputBorder.none,
104-
hintText: "Email or Phone number",
105-
hintStyle: TextStyle(color: Colors.grey[400])
106-
),
107-
),
108-
),
109-
Container(
110-
padding: EdgeInsets.all(8.0),
111-
child: TextField(
112-
decoration: InputDecoration(
113-
border: InputBorder.none,
114-
hintText: "Password",
115-
hintStyle: TextStyle(color: Colors.grey[400])
116-
),
117-
),
118-
)
119-
],
120-
),
121-
)),
122-
SizedBox(height: 30,),
123-
FadeAnimation(2, Container(
124-
height: 50,
125-
decoration: BoxDecoration(
126-
borderRadius: BorderRadius.circular(10),
127-
gradient: LinearGradient(
128-
colors: [
129-
Color.fromRGBO(143, 148, 251, 1),
130-
Color.fromRGBO(143, 148, 251, .6),
131-
]
132-
)
133-
),
134-
child: Center(
135-
child: Text("Login", style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold),),
136-
),
137-
)),
138-
SizedBox(height: 70,),
139-
FadeAnimation(1.5, Text("Forgot Password?", style: TextStyle(color: Color.fromRGBO(143, 148, 251, 1)),)),
140-
],
141-
),
142-
)
143-
],
144-
),
145-
),
16+
body: SingleChildScrollView(
17+
child: Container(
18+
child: Column(
19+
children: <Widget>[
20+
Container(
21+
height: 400,
22+
decoration: BoxDecoration(
23+
image: DecorationImage(
24+
image: AssetImage('assets/images/background.png'),
25+
fit: BoxFit.fill
26+
)
27+
),
28+
child: Stack(
29+
children: <Widget>[
30+
Positioned(
31+
left: 30,
32+
width: 80,
33+
height: 200,
34+
child: FadeAnimation(1, Container(
35+
decoration: BoxDecoration(
36+
image: DecorationImage(
37+
image: AssetImage('assets/images/light-1.png')
38+
)
39+
),
40+
)),
41+
),
42+
Positioned(
43+
left: 140,
44+
width: 80,
45+
height: 150,
46+
child: FadeAnimation(1.3, Container(
47+
decoration: BoxDecoration(
48+
image: DecorationImage(
49+
image: AssetImage('assets/images/light-2.png')
50+
)
51+
),
52+
)),
53+
),
54+
Positioned(
55+
right: 40,
56+
top: 40,
57+
width: 80,
58+
height: 150,
59+
child: FadeAnimation(1.5, Container(
60+
decoration: BoxDecoration(
61+
image: DecorationImage(
62+
image: AssetImage('assets/images/clock.png')
63+
)
64+
),
65+
)),
66+
),
67+
Positioned(
68+
child: FadeAnimation(1.6, Container(
69+
margin: EdgeInsets.only(top: 50),
70+
child: Center(
71+
child: Text("Login", style: TextStyle(color: Colors.white, fontSize: 40, fontWeight: FontWeight.bold),),
72+
),
73+
)),
74+
)
75+
],
76+
),
77+
),
78+
Padding(
79+
padding: EdgeInsets.all(30.0),
80+
child: Column(
81+
children: <Widget>[
82+
FadeAnimation(1.8, Container(
83+
padding: EdgeInsets.all(5),
84+
decoration: BoxDecoration(
85+
color: Colors.white,
86+
borderRadius: BorderRadius.circular(10),
87+
boxShadow: [
88+
BoxShadow(
89+
color: Color.fromRGBO(143, 148, 251, .2),
90+
blurRadius: 20.0,
91+
offset: Offset(0, 10)
92+
)
93+
]
94+
),
95+
child: Column(
96+
children: <Widget>[
97+
Container(
98+
padding: EdgeInsets.all(8.0),
99+
decoration: BoxDecoration(
100+
border: Border(bottom: BorderSide(color: Colors.grey[100]))
101+
),
102+
child: TextField(
103+
decoration: InputDecoration(
104+
border: InputBorder.none,
105+
hintText: "Email or Phone number",
106+
hintStyle: TextStyle(color: Colors.grey[400])
107+
),
108+
),
109+
),
110+
Container(
111+
padding: EdgeInsets.all(8.0),
112+
child: TextField(
113+
decoration: InputDecoration(
114+
border: InputBorder.none,
115+
hintText: "Password",
116+
hintStyle: TextStyle(color: Colors.grey[400])
117+
),
118+
),
119+
)
120+
],
121+
),
122+
)),
123+
SizedBox(height: 30,),
124+
FadeAnimation(2, Container(
125+
height: 50,
126+
decoration: BoxDecoration(
127+
borderRadius: BorderRadius.circular(10),
128+
gradient: LinearGradient(
129+
colors: [
130+
Color.fromRGBO(143, 148, 251, 1),
131+
Color.fromRGBO(143, 148, 251, .6),
132+
]
133+
)
134+
),
135+
child: Center(
136+
child: Text("Login", style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold),),
137+
),
138+
)),
139+
SizedBox(height: 70,),
140+
FadeAnimation(1.5, Text("Forgot Password?", style: TextStyle(color: Color.fromRGBO(143, 148, 251, 1)),)),
141+
],
142+
),
143+
)
144+
],
145+
),
146+
),
147+
)
146148
);
147149
}
148150
}

0 commit comments

Comments
 (0)