Commit 4dcf44e2 by Mobile : Art

update

parents 190fa8a1 6c2efa65
import 'package:feelverapp/ui/account_setting/account_setting_page.dart';
import 'package:feelverapp/ui/booking/booking_detail.dart'; import 'package:feelverapp/ui/booking/booking_detail.dart';
import 'package:feelverapp/ui/home/home.dart'; import 'package:feelverapp/ui/home/home.dart';
import 'package:feelverapp/ui/login/login.dart'; import 'package:feelverapp/ui/login/login.dart';
...@@ -28,7 +29,7 @@ class MyApp extends StatelessWidget { ...@@ -28,7 +29,7 @@ class MyApp extends StatelessWidget {
primarySwatch: Colors.blue, primarySwatch: Colors.blue,
), ),
home: SplashScreenPage() home: AccountSettingPage()
//home: EditProfile(), //home: EditProfile(),
......
...@@ -47,7 +47,7 @@ class _AccountSettingPageState extends State<AccountSettingPage> { ...@@ -47,7 +47,7 @@ class _AccountSettingPageState extends State<AccountSettingPage> {
SizedBox(height: SizeConfig.getHeight(65),), SizedBox(height: SizeConfig.getHeight(65),),
Card1(), Card1(),
Card2(), Card2(),
LogoutButton(),
], ],
), ),
), ),
...@@ -58,29 +58,6 @@ class _AccountSettingPageState extends State<AccountSettingPage> { ...@@ -58,29 +58,6 @@ class _AccountSettingPageState extends State<AccountSettingPage> {
} }
Widget LogoutButton(){
return Container(
// color: Colors.red,
margin: EdgeInsets.only(right: SizeConfig.getPadding(16)+10,left: SizeConfig.getPadding(16)+10,top: SizeConfig.getPadding(10),bottom: SizeConfig.getPadding(30)),
height: SizeConfig.getHeight(40),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Container(
child: Image.asset("assets/images/Icon_close.png"),
),
SizedBox(
width: 10,
),
Text("ออกจากระบบ",style: TextStyle(
color: Color(0xffEEAFB7),
fontSize: SizeConfig.getFontSize(16),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),),
],),
);
}
Widget Card1(){ Widget Card1(){
return Column( return Column(
...@@ -119,39 +96,7 @@ class _AccountSettingPageState extends State<AccountSettingPage> { ...@@ -119,39 +96,7 @@ class _AccountSettingPageState extends State<AccountSettingPage> {
Divider(color: Color(0x11000000),), Divider(color: Color(0x11000000),),
Container(
// color: Colors.red,
height: SizeConfig.getHeight(40),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Text("ที่อยู่ของฉัน",style: TextStyle(
color: Color(0xffEEAFB7),
fontSize: SizeConfig.getFontSize(16),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),),
Icon(Icons.keyboard_arrow_right,color: Color(0xAAA8B8C3),size: SizeConfig.getFontSize(26),),
],),
),
Divider(color: Color(0x11000000),),
Container(
// color: Colors.red,
height: SizeConfig.getHeight(40),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Text("ข้อมูลบัญชีธนาคาร/บัตร",style: TextStyle(
color: Color(0xffEEAFB7),
fontSize: SizeConfig.getFontSize(16),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),),
Icon(Icons.keyboard_arrow_right,color: Color(0xAAA8B8C3),size: SizeConfig.getFontSize(26),),
],),
),
Divider(color: Color(0x11000000),),
Container( Container(
// color: Colors.red, // color: Colors.red,
...@@ -213,22 +158,6 @@ class _AccountSettingPageState extends State<AccountSettingPage> { ...@@ -213,22 +158,6 @@ class _AccountSettingPageState extends State<AccountSettingPage> {
],), ],),
), ),
Divider(color: Color(0x11000000),),
Container(
// color: Colors.red,
height: SizeConfig.getHeight(40),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Text("ตั้งค่าการแชท",style: TextStyle(
color: Color(0xffEEAFB7),
fontSize: SizeConfig.getFontSize(16),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),),
Icon(Icons.keyboard_arrow_right,color: Color(0xAAA8B8C3),size: SizeConfig.getFontSize(26),),
],),
),
Divider(color: Color(0x11000000),), Divider(color: Color(0x11000000),),
...@@ -382,15 +311,7 @@ class _AccountSettingPageState extends State<AccountSettingPage> { ...@@ -382,15 +311,7 @@ class _AccountSettingPageState extends State<AccountSettingPage> {
fontSize: SizeConfig.getFontSize(18), fontSize: SizeConfig.getFontSize(18),
fontFamily: "SF_Pro_Text", fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500),), fontWeight: FontWeight.w500),),
SizedBox(
height: 5,
),
Text("แก้ไขข้อมูลส่วนตัว",style: TextStyle(
color: Colors.yellow,
fontSize: SizeConfig.getFontSize(12),
fontFamily: "SF_Pro_Text",
fontWeight: FontWeight.w500,decoration: TextDecoration.underline),
),
SizedBox( SizedBox(
height: 5, height: 5,
), ),
...@@ -398,14 +319,7 @@ class _AccountSettingPageState extends State<AccountSettingPage> { ...@@ -398,14 +319,7 @@ class _AccountSettingPageState extends State<AccountSettingPage> {
), ),
), ),
), ),
Container(
alignment: Alignment.centerRight,
//color: Colors.yellow,
width: 85,
height: 85,
margin: EdgeInsets.only(right: SizeConfig.getPadding(16),bottom: 10),
child: Icon(Icons.settings,color: Colors.white,),
),
], ],
), ),
) )
...@@ -426,9 +340,9 @@ class _AccountSettingPageState extends State<AccountSettingPage> { ...@@ -426,9 +340,9 @@ class _AccountSettingPageState extends State<AccountSettingPage> {
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.circular(50), borderRadius: BorderRadius.circular(50),
child: Image.network( child: Image.network(
'https://scontent.fbkk7-2.fna.fbcdn.net/v/t1.0-9/104204530_3370427592977187_6031309814586327212_o.jpg?_nc_cat=106&_nc_sid=110474&_nc_eui2=AeE2vpoR5NHZLbG8b3YABiSdSsMCoPYM3W1KwwKg9gzdbZuYqR1gPnkW3tGe-TS2Vtphdvn2OuvO2CdDLaCMVvcI&_nc_ohc=T5EK3sWOgtAAX994m4I&_nc_ht=scontent.fbkk7-2.fna&oh=0b3e434546b19e256c07ecd6a4d499fb&oe=5F098A94', 'https://backend-uat.feelver.com/storage/2020/08/08_image.jpg',
width: 85.0, width: 105.0,
height: 85.0, height: 105.0,
fit: BoxFit.cover, fit: BoxFit.cover,
), ),
), ),
......
...@@ -10,7 +10,10 @@ import '../../util/SizeConfig.dart'; ...@@ -10,7 +10,10 @@ import '../../util/SizeConfig.dart';
class EditProfile extends StatefulWidget { class EditProfile extends StatefulWidget {
String id; String id;
EditProfile({Key key,this.id,}) : super(key: key); EditProfile({
Key key,
this.id,
}) : super(key: key);
@override @override
_EditProfileState createState() => _EditProfileState(); _EditProfileState createState() => _EditProfileState();
} }
...@@ -23,7 +26,7 @@ class _EditProfileState extends State<EditProfile> { ...@@ -23,7 +26,7 @@ class _EditProfileState extends State<EditProfile> {
super.initState(); super.initState();
presenter = EditprofilePresenter(this); presenter = EditprofilePresenter(this);
print("wwww id ="+widget.id);
presenter.getprofile(widget.id); presenter.getprofile(widget.id);
} }
...@@ -31,7 +34,7 @@ class _EditProfileState extends State<EditProfile> { ...@@ -31,7 +34,7 @@ class _EditProfileState extends State<EditProfile> {
ImagePickerUtil(context, (img) { ImagePickerUtil(context, (img) {
setState(() { setState(() {
image = img; image = img;
presenter.imageFile=img; presenter.imageFile = img;
}); });
}); });
} }
...@@ -79,7 +82,8 @@ class _EditProfileState extends State<EditProfile> { ...@@ -79,7 +82,8 @@ class _EditProfileState extends State<EditProfile> {
height: SizeConfig.getWidth(100), height: SizeConfig.getWidth(100),
), ),
) )
:presenter.getmodel.result[0].image==null? Stack( : presenter.getmodel.result[0].image == null
? Stack(
children: <Widget>[ children: <Widget>[
Container( Container(
height: SizeConfig.getWidth(80), height: SizeConfig.getWidth(80),
...@@ -92,7 +96,8 @@ class _EditProfileState extends State<EditProfile> { ...@@ -92,7 +96,8 @@ class _EditProfileState extends State<EditProfile> {
top: SizeConfig.getPadding(30)), top: SizeConfig.getPadding(30)),
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color.fromRGBO(238, 175, 183, 1), color:
Color.fromRGBO(238, 175, 183, 1),
shape: BoxShape.circle, shape: BoxShape.circle,
border: Border.all( border: Border.all(
color: Colors.white, width: 1.4)), color: Colors.white, width: 1.4)),
...@@ -112,8 +117,8 @@ class _EditProfileState extends State<EditProfile> { ...@@ -112,8 +117,8 @@ class _EditProfileState extends State<EditProfile> {
), ),
) )
], ],
): )
ClipRRect( : ClipRRect(
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(SizeConfig.getWidth(56))), Radius.circular(SizeConfig.getWidth(56))),
child: Image.network( child: Image.network(
...@@ -123,8 +128,6 @@ class _EditProfileState extends State<EditProfile> { ...@@ -123,8 +128,6 @@ class _EditProfileState extends State<EditProfile> {
height: SizeConfig.getWidth(100), height: SizeConfig.getWidth(100),
), ),
), ),
), ),
Container( Container(
alignment: Alignment.topLeft, alignment: Alignment.topLeft,
...@@ -213,7 +216,9 @@ class _EditProfileState extends State<EditProfile> { ...@@ -213,7 +216,9 @@ class _EditProfileState extends State<EditProfile> {
focusedBorder: UnderlineInputBorder( focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(color: Colors.black45), borderSide: BorderSide(color: Colors.black45),
), ),
hintText: '${presenter.getmodel.result[0].age}', hintText: presenter.getmodel.result[0].age == null
? " - "
: '${presenter.getmodel.result[0].age}',
labelText: 'อายุ', labelText: 'อายุ',
labelStyle: TextStyle( labelStyle: TextStyle(
color: Colors.black87, color: Colors.black87,
...@@ -285,7 +290,9 @@ class _EditProfileState extends State<EditProfile> { ...@@ -285,7 +290,9 @@ class _EditProfileState extends State<EditProfile> {
focusedBorder: UnderlineInputBorder( focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(color: Colors.black45), borderSide: BorderSide(color: Colors.black45),
), ),
hintText: '${presenter.getmodel.result[0].address}', hintText: presenter.getmodel.result[0].address == null
? " - "
: '${presenter.getmodel.result[0].address}',
labelText: 'ที่อยู่', labelText: 'ที่อยู่',
labelStyle: TextStyle( labelStyle: TextStyle(
color: Colors.black87, color: Colors.black87,
...@@ -333,7 +340,6 @@ class _EditProfileState extends State<EditProfile> { ...@@ -333,7 +340,6 @@ class _EditProfileState extends State<EditProfile> {
padding: EdgeInsets.all(0.0), padding: EdgeInsets.all(0.0),
splashColor: Colors.blueAccent, splashColor: Colors.blueAccent,
onPressed: () { onPressed: () {
presenter.letCheckData(); presenter.letCheckData();
print('name= ${presenter.nameCtrl.text}'); print('name= ${presenter.nameCtrl.text}');
print('lastname= ${presenter.lnameCtrl.text}'); print('lastname= ${presenter.lnameCtrl.text}');
...@@ -342,8 +348,6 @@ class _EditProfileState extends State<EditProfile> { ...@@ -342,8 +348,6 @@ class _EditProfileState extends State<EditProfile> {
print('sex= ${presenter.selectedSex.text}'); print('sex= ${presenter.selectedSex.text}');
print('add= ${presenter.addresCtrl.text}'); print('add= ${presenter.addresCtrl.text}');
print('age= ${presenter.ageCtrl.text}'); print('age= ${presenter.ageCtrl.text}');
}, },
shape: new RoundedRectangleBorder( shape: new RoundedRectangleBorder(
borderRadius: new BorderRadius.circular(20.0)), borderRadius: new BorderRadius.circular(20.0)),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment