Skip to content

Commit 883e219

Browse files
author
Jack
committed
Fixed Image Picker
1 parent ed65013 commit 883e219

File tree

2 files changed

+43
-43
lines changed

2 files changed

+43
-43
lines changed

lib/page/signup/SignPageTwo.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ class SignPageTwo extends StatelessWidget {
2121
child: ListView(
2222
physics: BouncingScrollPhysics(),
2323
children: <Widget>[
24-
ProfileImagePicker(
25-
margin: EdgeInsets.only(top: 32.0, left: 32.0, right: 32.0),
24+
Center(
25+
child: ProfileImagePicker(
26+
margin: EdgeInsets.only(top: 32.0, left: 32.0, right: 32.0),
27+
),
2628
),
2729
DatePicker(),
2830
GenderPicker(),

lib/page/signup/widgets/signup_profile_image_picker.dart

Lines changed: 39 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -28,48 +28,46 @@ class _ProfileImagePickerState extends State<ProfileImagePicker> {
2828

2929
@override
3030
Widget build(BuildContext context) {
31-
return Center(
32-
child: Container(
33-
margin: widget.margin,
34-
child: Stack(
35-
alignment: Alignment.topRight,
36-
children: <Widget>[
37-
Container(
38-
width: 260.0,
39-
height: 200.0,
40-
decoration: BoxDecoration(
41-
boxShadow: [
42-
BoxShadow(
43-
color: Colors.black12,
44-
blurRadius: 15,
45-
spreadRadius: 0,
46-
offset: Offset(0.0, 16.0)),
47-
],
48-
),
49-
child: ClipRRect(
50-
borderRadius: BorderRadius.circular(16.0),
51-
child: _image != null
52-
? Image.file(
53-
_image,
54-
fit: BoxFit.contain,
55-
)
56-
: Image.asset(
57-
'assets/images/signup/signup_page_9_profile.png',
58-
fit: BoxFit.fill,
59-
),
60-
),
31+
return Container(
32+
margin: widget.margin,
33+
child: Stack(
34+
alignment: Alignment.topRight,
35+
children: <Widget>[
36+
Container(
37+
width: 260.0,
38+
height: 200.0,
39+
decoration: BoxDecoration(
40+
boxShadow: [
41+
BoxShadow(
42+
color: Colors.black12,
43+
blurRadius: 15,
44+
spreadRadius: 0,
45+
offset: Offset(0.0, 16.0)),
46+
],
6147
),
62-
IconButton(
63-
onPressed: () async {
64-
await getImage();
65-
},
66-
icon: Icon(
67-
IconData(camera, fontFamily: 'Icons'),
68-
color: Color(0xffDBEDAF),
69-
),
70-
)
71-
],
72-
),
48+
child: ClipRRect(
49+
borderRadius: BorderRadius.circular(16.0),
50+
child: _image != null
51+
? Image.file(
52+
_image,
53+
fit: BoxFit.contain,
54+
)
55+
: Image.asset(
56+
'assets/images/signup/signup_page_9_profile.png',
57+
fit: BoxFit.fill,
58+
),
59+
),
60+
),
61+
IconButton(
62+
onPressed: () async {
63+
await getImage();
64+
},
65+
icon: Icon(
66+
IconData(camera, fontFamily: 'Icons'),
67+
color: Color(0xffDBEDAF),
68+
),
69+
)
70+
],
7371
),
7472
);
7573
}

0 commit comments

Comments
 (0)