fix: homepage view

This commit is contained in:
Prajna Prayoga 2024-03-05 19:25:49 +07:00
parent 23e1a6628f
commit e513df325c
2 changed files with 118 additions and 108 deletions

View File

@ -52,7 +52,7 @@ class PhoneNumberView extends StatelessWidget {
width: SizeConfig.width * .23, width: SizeConfig.width * .23,
padding: padding:
const EdgeInsets.symmetric(horizontal: 16.0), const EdgeInsets.symmetric(horizontal: 16.0),
margin: const EdgeInsets.only(right: 16), margin: const EdgeInsets.only(right: 16, left: 2, top: 2, bottom: 2),
decoration: const BoxDecoration( decoration: const BoxDecoration(
color: ColorPalette.grey, color: ColorPalette.grey,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(

View File

@ -50,7 +50,7 @@ class _HomeViewState extends State<HomeView> {
]; ];
StepVerification listStepVerification = StepVerification listStepVerification =
StepVerification(0, ['Registration', 'Verification', 'Complete']); StepVerification(0, ['Registration', '', 'Verification', '', 'Complete']);
List<Article> listArticle = [ List<Article> listArticle = [
Article( Article(
@ -69,12 +69,20 @@ class _HomeViewState extends State<HomeView> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: const Color(0xffF8FAFC), backgroundColor: ColorPalette.slate50,
body: SizedBox( body: CustomScrollView(
width: SizeConfig.width, slivers: [
height: SizeConfig.height, SliverAppBar(
child: Stack( onStretchTrigger: () async {
},
expandedHeight: 325,
leading: SizedBox(),
surfaceTintColor: ColorPalette.slate50,
backgroundColor: ColorPalette.slate50,
flexibleSpace: FlexibleSpaceBar(
background: Stack(
children: [ children: [
const ImageView(image: PathAssets.imgDashboardAccount), const ImageView(image: PathAssets.imgDashboardAccount),
Column( Column(
@ -118,11 +126,18 @@ class _HomeViewState extends State<HomeView> {
), ),
cardInvestType(), cardInvestType(),
const SizedBox( const SizedBox(
height: 32, height: 24,
), ),
Expanded( ],
child: ListView( )
padding: const EdgeInsets.all(0), ],
),
),
floating: true,
snap: true,
),
SliverToBoxAdapter(
child: Column(
children: [ children: [
cardVerification(), cardVerification(),
const SizedBox( const SizedBox(
@ -135,12 +150,9 @@ class _HomeViewState extends State<HomeView> {
articles(), articles(),
], ],
), ),
),
],
) )
], ],
), ),
),
); );
} }
@ -417,12 +429,10 @@ class _HomeViewState extends State<HomeView> {
Widget stepVerification() { Widget stepVerification() {
return Row( return Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: listStepVerification.nameStep.asMap().entries.map((e) {
return Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: listStepVerification.nameStep.asMap().entries.map((e) {
if (e.key != 0) if(e.key == 1 || e.key == 3){
SizedBox( return SizedBox(
width: 30, width: 30,
height: 30, height: 30,
child: Divider( child: Divider(
@ -430,8 +440,9 @@ class _HomeViewState extends State<HomeView> {
? const Color(0xff2563EB) ? const Color(0xff2563EB)
: const Color(0xffCBD5E1), : const Color(0xffCBD5E1),
), ),
), );
Column( }else{
return Column(
children: [ children: [
Container( Container(
width: 30, width: 30,
@ -464,9 +475,8 @@ class _HomeViewState extends State<HomeView> {
: Colors.black), : Colors.black),
) )
], ],
),
],
); );
}
}).toList(), }).toList(),
); );
} }