fix: product view

This commit is contained in:
2024-03-06 16:43:02 +07:00
parent e513df325c
commit e441c56bab
4 changed files with 172 additions and 102 deletions

View File

@@ -50,7 +50,7 @@ class _HomeViewState extends State<HomeView> {
];
StepVerification listStepVerification =
StepVerification(0, ['Registration', '', 'Verification', '', 'Complete']);
StepVerification(1, ['Registration', '', 'Verification', '', 'Complete']);
List<Article> listArticle = [
Article(
@@ -78,7 +78,8 @@ class _HomeViewState extends State<HomeView> {
onStretchTrigger: () async {
},
expandedHeight: 325,
leading: SizedBox(),
collapsedHeight: 325,
leading: const SizedBox(),
surfaceTintColor: ColorPalette.slate50,
backgroundColor: ColorPalette.slate50,
flexibleSpace: FlexibleSpaceBar(
@@ -291,9 +292,10 @@ class _HomeViewState extends State<HomeView> {
child: Column(
children: [
stepVerification(),
const SizedBox(
height: 24,
),
if(listStepVerification.currentStep < 3)
const SizedBox(
height: 24,
),
if (listStepVerification.currentStep == 1) ...[
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
@@ -303,6 +305,7 @@ class _HomeViewState extends State<HomeView> {
Icon(
Icons.verified,
size: 18,
color: ColorPalette.slate300,
),
SizedBox(
width: 12,
@@ -336,6 +339,7 @@ class _HomeViewState extends State<HomeView> {
Icon(
Icons.verified,
size: 18,
color: ColorPalette.slate300,
),
SizedBox(
width: 12,
@@ -400,11 +404,11 @@ class _HomeViewState extends State<HomeView> {
borderRadius: BorderRadius.circular(12)),
child: Column(
children: [
Text(
const Text(
"Let's start registering your data to start mutual fund investment at PT Gemilang Indonesia",
style: TextStyle(color: ColorPalette.slate500),
),
SizedBox(
const SizedBox(
height: 16,
),
ButtonView(
@@ -412,9 +416,9 @@ class _HomeViewState extends State<HomeView> {
width: SizeConfig.width,
marginVertical: 0,
heightWrapContent: true,
contentPadding: EdgeInsets.all(12),
contentPadding: const EdgeInsets.all(12),
onPressed: () {
routePush(context, page: InitialRegistrationStep());
routePush(context, page: const InitialRegistrationStep());
},
)
],
@@ -430,54 +434,60 @@ class _HomeViewState extends State<HomeView> {
return Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: listStepVerification.nameStep.asMap().entries.map((e) {
if(e.key == 1 || e.key == 3){
return SizedBox(
width: 30,
height: 30,
child: Divider(
color: listStepVerification.currentStep >= e.key
? const Color(0xff2563EB)
: const Color(0xffCBD5E1),
),
);
}else{
return Column(
children: [
Container(
width: 30,
height: 30,
decoration: BoxDecoration(
children: List.generate(
listStepVerification.nameStep.length,
(index) {
print(index % 2);
if (index % 2 == 0) {
final currentStep = index ~/ 2;
return Column(
children: [
Container(
width: 30,
height: 30,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: listStepVerification.currentStep <= e.key
color: listStepVerification.currentStep <= currentStep
? Colors.white
: const Color(0xff2563EB),
border: Border.all(
color: listStepVerification.currentStep < e.key
? const Color(0xffCBD5E1)
: const Color(0xff2563EB),
width: 2)),
child: listStepVerification.currentStep <= e.key
? const SizedBox()
: const Icon(
Icons.done_rounded,
color: Colors.white,
color: listStepVerification.currentStep < currentStep
? const Color(0xffCBD5E1)
: const Color(0xff2563EB),
width: 2,
),
),
child: listStepVerification.currentStep <= currentStep
? const SizedBox()
: const Icon(
Icons.done_rounded,
color: Colors.white,
),
),
),
const SizedBox(
height: 8,
),
Text(
e.value,
style: TextStyle(
color: listStepVerification.currentStep == e.key
const SizedBox(height: 8),
Text(
listStepVerification.nameStep[index],
style: TextStyle(
color: listStepVerification.currentStep == currentStep
? const Color(0xff2563EB)
: Colors.black),
)
],
);
}
}).toList(),
: Colors.black,
),
),
],
);
} else {
return SizedBox(
width: 30,
height: 30,
child: Divider(
color: listStepVerification.currentStep > index ~/ 2
? const Color(0xff2563EB)
: const Color(0xffCBD5E1),
),
);
}
},
),
);
}
@@ -601,7 +611,7 @@ class _HomeViewState extends State<HomeView> {
color: ColorPalette.green100),
child: Text(
article.type,
style: TextStyle(
style: const TextStyle(
fontWeight: FontWeight.w600,
color: ColorPalette.green500),
),