|
1 |
| -import 'dart:async'; |
2 |
| - |
3 | 1 | import 'package:flutter/material.dart';
|
4 | 2 | import 'package:flutter_ui_nice/page/signup/widgets/signup_apbar.dart';
|
5 | 3 | import '../../const/gradient_const.dart';
|
6 |
| -import '../../const/icons.dart'; |
7 | 4 | import '../../const/styles.dart';
|
8 |
| -import 'package:image_picker/image_picker.dart'; |
9 |
| -import 'dart:io'; |
10 |
| - |
11 |
| -class SignPageNine extends StatefulWidget { |
12 |
| - @override |
13 |
| - State<StatefulWidget> createState() => SignPageNineState(); |
14 |
| -} |
15 |
| - |
16 |
| -class SignPageNineState extends State<SignPageNine> { |
17 |
| - File _image; |
18 |
| - |
19 |
| - Future getImage() async { |
20 |
| - File image = await ImagePicker.pickImage(source: ImageSource.camera); |
21 |
| - |
22 |
| - setState(() { |
23 |
| - _image = image; |
24 |
| - }); |
25 |
| - } |
| 5 | +import 'widgets/signup_profile_image_picker.dart'; |
| 6 | +import 'widgets/signup_button.dart'; |
26 | 7 |
|
| 8 | +class SignPageNine extends StatelessWidget { |
27 | 9 | @override
|
28 | 10 | Widget build(BuildContext context) {
|
29 | 11 | final double statusbarHeight = MediaQuery.of(context).padding.top;
|
@@ -88,84 +70,13 @@ class SignPageNineState extends State<SignPageNine> {
|
88 | 70 | ),
|
89 | 71 | ),
|
90 | 72 | ),
|
91 |
| - Container( |
92 |
| - margin: EdgeInsets.only(left: 32.0, right: 72.0, top: 56.0), |
93 |
| - child: Stack( |
94 |
| - alignment: Alignment.topRight, |
95 |
| - children: <Widget>[ |
96 |
| - Container( |
97 |
| - width: 400.0, |
98 |
| - height: 182.0, |
99 |
| - decoration: BoxDecoration( |
100 |
| - boxShadow: [ |
101 |
| - BoxShadow( |
102 |
| - color: Colors.black12, |
103 |
| - blurRadius: 15, |
104 |
| - spreadRadius: 0, |
105 |
| - offset: Offset(0.0, 16.0)), |
106 |
| - ], |
107 |
| - ), |
108 |
| - child: ClipRRect( |
109 |
| - borderRadius: BorderRadius.circular(16.0), |
110 |
| - child: _image != null |
111 |
| - ? Image.file( |
112 |
| - _image, |
113 |
| - fit: BoxFit.fitWidth, |
114 |
| - ) |
115 |
| - : Image.asset( |
116 |
| - 'assets/images/signup/signup_page_9_profile.png', |
117 |
| - fit: BoxFit.fill, |
118 |
| - ), |
119 |
| - ), |
120 |
| - ), |
121 |
| - IconButton( |
122 |
| - onPressed: () async { |
123 |
| - await getImage(); |
124 |
| - }, |
125 |
| - icon: Icon( |
126 |
| - IconData(camera, fontFamily: 'Icons'), |
127 |
| - color: Color(0xffDBEDAF), |
128 |
| - ), |
129 |
| - ) |
130 |
| - ], |
131 |
| - ), |
132 |
| - ), |
| 73 | + ProfileImagePicker( |
| 74 | + margin: |
| 75 | + EdgeInsets.only(left: 32.0, right: 72.0, top: 56.0)), |
133 | 76 | Positioned(
|
134 | 77 | bottom: 16.0,
|
135 | 78 | right: 18.9,
|
136 |
| - child: InkWell( |
137 |
| - onTap: () {}, |
138 |
| - child: Container( |
139 |
| - padding: EdgeInsets.symmetric( |
140 |
| - horizontal: 36.0, vertical: 16.0), |
141 |
| - decoration: BoxDecoration( |
142 |
| - boxShadow: [ |
143 |
| - BoxShadow( |
144 |
| - color: Colors.black12, |
145 |
| - blurRadius: 15, |
146 |
| - spreadRadius: 0, |
147 |
| - offset: Offset(0.0, 32.0)), |
148 |
| - ], |
149 |
| - borderRadius: new BorderRadius.circular(36.0), |
150 |
| - gradient: |
151 |
| - LinearGradient(begin: FractionalOffset.centerLeft, |
152 |
| -// Add one stop for each color. Stops should increase from 0 to 1 |
153 |
| - stops: [ |
154 |
| - 0.2, |
155 |
| - 1 |
156 |
| - ], colors: [ |
157 |
| - Color(0xff000000), |
158 |
| - Color(0xff434343), |
159 |
| - ])), |
160 |
| - child: Text( |
161 |
| - 'NEXT', |
162 |
| - style: TextStyle( |
163 |
| - color: Color(0xffF1EA94), |
164 |
| - fontWeight: FontWeight.bold, |
165 |
| - fontFamily: 'Montserrat'), |
166 |
| - ), |
167 |
| - ), |
168 |
| - ), |
| 79 | + child: signupButton('NEXT'), |
169 | 80 | ),
|
170 | 81 | ],
|
171 | 82 | ),
|
|
0 commit comments