Skip to content

Commit 9e19ab0

Browse files
committed
sign 5 fix scroll problem
1 parent 160fb7a commit 9e19ab0

File tree

1 file changed

+53
-9
lines changed

1 file changed

+53
-9
lines changed

lib/page/signup/SignPageFive.dart

Lines changed: 53 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,7 @@ class _SignPageFiveState extends State<SignPageFive> {
2424

2525
@override
2626
void initState() {
27-
_pageController.addListener(() {
28-
setState(() {
29-
widgetIndex = _pageController.page.ceil();
30-
});
31-
});
27+
_pageController = PageController();
3228

3329
super.initState();
3430
}
@@ -37,7 +33,7 @@ class _SignPageFiveState extends State<SignPageFive> {
3733
Widget build(BuildContext context) {
3834
List<Widget> widgets = [
3935
loginColumn(),
40-
loginColumn(),
36+
sigNupColumn(),
4137
];
4238

4339
return Scaffold(
@@ -78,8 +74,8 @@ class _SignPageFiveState extends State<SignPageFive> {
7874
onTap: () {
7975
_selectType(false);
8076
_pageController.previousPage(
81-
duration: Duration(milliseconds: 200),
82-
curve: Curves.bounceInOut,
77+
duration: Duration(milliseconds: 300),
78+
curve: Curves.easeInBack,
8379
);
8480
},
8581
child: Opacity(
@@ -99,7 +95,7 @@ class _SignPageFiveState extends State<SignPageFive> {
9995
InkWell(
10096
onTap: () {
10197
_pageController.nextPage(
102-
duration: Duration(milliseconds: 200),
98+
duration: Duration(milliseconds: 300),
10399
curve: Curves.easeInBack,
104100
);
105101
_selectType(true);
@@ -247,6 +243,54 @@ class _SignPageFiveState extends State<SignPageFive> {
247243
);
248244
}
249245

246+
Column sigNupColumn() {
247+
return Column(
248+
crossAxisAlignment: CrossAxisAlignment.start,
249+
children: <Widget>[
250+
SizedBox(
251+
height: 10,
252+
),
253+
Text(
254+
"Welcome",
255+
style: TextStyle(
256+
fontSize: 40,
257+
fontWeight: FontWeight.w400,
258+
wordSpacing: 2,
259+
letterSpacing: 2,
260+
),
261+
),
262+
Text(
263+
"Sign In!",
264+
style: TextStyle(
265+
fontSize: 40,
266+
fontWeight: FontWeight.w400,
267+
wordSpacing: 2,
268+
letterSpacing: 2,
269+
),
270+
),
271+
Expanded(child: Container()),
272+
emailTextFieldWidget(),
273+
SizedBox(
274+
height: 1.5,
275+
child: Container(
276+
color: Colors.black,
277+
),
278+
),
279+
Expanded(
280+
flex: 3,
281+
child: passwordTextFieldWidget(),
282+
),
283+
Text(
284+
"NEXT",
285+
style: TextStyle(fontSize: 14, fontWeight: FontWeight.bold),
286+
),
287+
SizedBox(
288+
height: 15,
289+
)
290+
],
291+
);
292+
}
293+
250294
Column loginColumn() {
251295
return Column(
252296
crossAxisAlignment: CrossAxisAlignment.start,

0 commit comments

Comments
 (0)