From 680dc463ea025ae2f0c3053d93fbd8494374b998 Mon Sep 17 00:00:00 2001 From: Stephen Date: Fri, 12 Jan 2024 15:45:34 +0700 Subject: [PATCH] [Homepage] 9. add user profile google --- images/alert_badge.png | Bin 0 -> 432 bytes images/avatar_c.png | Bin 0 -> 885 bytes lib/app/constant.dart | 2 +- lib/screen/homepage/homepage_screen.dart | 71 ++++++++++++++++++++++- 4 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 images/alert_badge.png create mode 100644 images/avatar_c.png diff --git a/images/alert_badge.png b/images/alert_badge.png new file mode 100644 index 0000000000000000000000000000000000000000..8acbeaacb3e489ea5db6b7b47c6bb6b8fb09d58a GIT binary patch literal 432 zcmV;h0Z;ykP)2iAYEAt3Y9- zB*y-d33%Jr@2vfcpj3);|4>L)bNAk3TIk-VQ`<6k)_&J$VA3${RKt3WLuCTOaV$iBh0 zFol({n&i&gT~~oi{3XWMMjV}as9(cO56eBPV>~wM`Cc+%P9VP+tn-J#AnT0qe76|* a58eTI)LHmBqhB2W0000L^9Y{o-MblpXxtDFFepQy6u_y% zQ_3?q1ly2dw!yrfez_BRydG5PL=p0k2oH!T0}mL;vE{4?TdrjOg@Qy##t<#Z%mCHE z2rcu%MZ(Go+8Ym2roDYmX3V0NFrL}N!-e#Em`A08)KA1JYw~mu^`Ky_k@NhE%81#l zdWjN>GR1$~GBrYsBHu8E*7TbwC+OH`0yK_6_st^WCDX7L#Y<=c*1DzJ(s67dS*kfS z3Ae38WBpOk#9QjKaTv0Xv_7%U3`*`d|icClVyi zJu^Wr9uNO-mlL$)&Wz?wyc%s%(`2EHiG46gs9}-gLq`0aa=fr~j z_y#p5Wsro1^E)1!lUW3+~+&?Lk<3(+_hlzyQ#EoISY7}@m7NjF=PI&53p zyok!7afH&v&KKV(5tLre<*l`Mbs`!eM!StuE%lk?s-2`xth1=xaqAPFesFHKccR)Z z4b{b`#Aocm;Yhi2ql=GYCZ&Od>)8TSN2rlp2%hp(eqc4J2Ucd5m literal 0 HcmV?d00001 diff --git a/lib/app/constant.dart b/lib/app/constant.dart index 131afb7..c05c4ed 100644 --- a/lib/app/constant.dart +++ b/lib/app/constant.dart @@ -95,7 +95,7 @@ class Constant { static TextStyle subtitle_500_12({required BuildContext context}) { return TextStyle( fontSize: Constant.getActualYPhone(context: context, y: 12), - fontWeight: FontWeight.w700, + fontWeight: FontWeight.w500, fontFamily: 'Public Sans', ); } diff --git a/lib/screen/homepage/homepage_screen.dart b/lib/screen/homepage/homepage_screen.dart index 2ce8306..cf024f1 100644 --- a/lib/screen/homepage/homepage_screen.dart +++ b/lib/screen/homepage/homepage_screen.dart @@ -17,7 +17,10 @@ class HomepageScreen extends StatelessWidget { child: FloatingActionButton( onPressed: () {}, backgroundColor: Color(0xFFFFFFFF), - shape: CircleBorder(), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular( + 8.0), // Sesuaikan radius sesuai keinginan Anda + ), child: Container( width: Constant.getActualXPhone(context: context, x: 50), height: Constant.getActualYPhone(context: context, y: 50), @@ -90,6 +93,72 @@ class HomepageScreen extends StatelessWidget { body: SafeArea( child: Column( children: [ + Container( + child: ListTile( + leading: Container( + width: Constant.getActualXPhone(context: context, x: 36), + height: Constant.getActualYPhone(context: context, y: 36), + child: Image( + image: AssetImage('images/avatar_c.png'), + )), + title: Text( + "Stephen Kusumo", + style: Constant.titleH1_700(context: context) + ..copyWith( + color: Constant.textBlack, + ), + ), + subtitle: Text( + "Step@example.com", + style: Constant.subtitle_500_12(context: context).copyWith( + color: Constant.textLightGrey, + ), + ), + trailing: Container( + width: Constant.getActualXPhone(context: context, x: 36), + height: Constant.getActualYPhone(context: context, y: 36), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12.0), + color: Colors.white, + shape: BoxShape.rectangle, + boxShadow: [ + BoxShadow( + offset: Offset(0, 12), + blurRadius: 24, + color: Color.fromRGBO(145, 158, 171, 0.12), + ), + ], + ), + child: IconButton( + onPressed: () {}, + icon: Container( + width: Constant.getActualXPhone(context: context, x: 20), + height: Constant.getActualYPhone(context: context, y: 20), + child: Image( + image: AssetImage('images/alert_badge.png'), + ), + ), + ), + // child: ElevatedButton( + // onPressed: () { + // // Action to be performed on button press + // }, + // child: Container( + // width: Constant.getActualXPhone(context: context, x: 20), + // height: Constant.getActualYPhone(context: context, y: 20), + // decoration: BoxDecoration( + // image: DecorationImage( + // image: AssetImage( + // 'images/alert_badge.png', // Ganti dengan path gambar Anda + // ), + // ), + // ), + // ), + // ), + ), + ), + ), + SizedBox( height: Constant.getActualYPhone(context: context, y: 44), ),