fix: see more product view
This commit is contained in:
parent
89a79276a6
commit
de1782c2c2
|
@ -102,7 +102,7 @@ class _InvestTypeViewState extends State<InvestTypeView> {
|
||||||
onTap: () {
|
onTap: () {
|
||||||
provider.setSelectedProduct(e.value);
|
provider.setSelectedProduct(e.value);
|
||||||
routePush(context,
|
routePush(context,
|
||||||
page: ProductView(widget.title));
|
page: ProductView(selectedProduct: e.value));
|
||||||
},
|
},
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
|
|
|
@ -3,7 +3,9 @@ import 'package:cims_apps/application/component/button/button_view.dart';
|
||||||
import 'package:cims_apps/application/component/image/image_view.dart';
|
import 'package:cims_apps/application/component/image/image_view.dart';
|
||||||
import 'package:cims_apps/application/component/subscribe/total_payment_view.dart';
|
import 'package:cims_apps/application/component/subscribe/total_payment_view.dart';
|
||||||
import 'package:cims_apps/application/theme/color_palette.dart';
|
import 'package:cims_apps/application/theme/color_palette.dart';
|
||||||
|
import 'package:cims_apps/core/route/route.dart';
|
||||||
import 'package:cims_apps/core/utils/size_config.dart';
|
import 'package:cims_apps/core/utils/size_config.dart';
|
||||||
|
import 'package:cims_apps/features/dashboard/dashboard_account/view/product/view/product_view.dart';
|
||||||
import 'package:cims_apps/features/dashboard/dashboard_account/view/product/view_model/product_view_model.dart';
|
import 'package:cims_apps/features/dashboard/dashboard_account/view/product/view_model/product_view_model.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
@ -111,6 +113,7 @@ class ResultOptionsProduct extends StatelessWidget {
|
||||||
),
|
),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
routePush(context, page: ProductView(selectedProduct: e.value, seeMore: true));
|
||||||
},
|
},
|
||||||
child: const Text('See More',
|
child: const Text('See More',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
|
|
@ -24,8 +24,9 @@ class Time {
|
||||||
}
|
}
|
||||||
|
|
||||||
class ProductView extends StatefulWidget {
|
class ProductView extends StatefulWidget {
|
||||||
final String investType;
|
final bool seeMore;
|
||||||
const ProductView(this.investType, {super.key});
|
final Product selectedProduct;
|
||||||
|
const ProductView({super.key, required this.selectedProduct, this.seeMore = false});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<ProductView> createState() => _ProductViewState();
|
State<ProductView> createState() => _ProductViewState();
|
||||||
|
@ -144,22 +145,23 @@ class _ProductViewState extends State<ProductView> {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
bottomNavigationBar: Container(
|
bottomNavigationBar: !widget.seeMore ?
|
||||||
height: SizeConfig.height * .1,
|
Container(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 24),
|
height: SizeConfig.height * .1,
|
||||||
child: ButtonView(
|
padding: const EdgeInsets.symmetric(horizontal: 24),
|
||||||
name: 'Subscribe',
|
child: ButtonView(
|
||||||
onPressed: () {
|
name: 'Subscribe',
|
||||||
showModalBottomSheet(
|
onPressed: () {
|
||||||
context: context,
|
showModalBottomSheet(
|
||||||
isScrollControlled: true,
|
context: context,
|
||||||
builder: (context) => SelectGoalInvesting(),
|
isScrollControlled: true,
|
||||||
);
|
builder: (context) => SelectGoalInvesting(),
|
||||||
},
|
);
|
||||||
height: SizeConfig.height * 0.06,
|
},
|
||||||
marginVertical: 16,
|
height: SizeConfig.height * 0.06,
|
||||||
),
|
marginVertical: 16,
|
||||||
),
|
),
|
||||||
|
) : SizedBox(),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -177,7 +179,7 @@ class _ProductViewState extends State<ProductView> {
|
||||||
SizedBox(width: 8),
|
SizedBox(width: 8),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
'Gemilang Dana Kas Maxima',
|
widget.selectedProduct.name ?? '',
|
||||||
maxLines: 2,
|
maxLines: 2,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
@ -190,17 +192,18 @@ class _ProductViewState extends State<ProductView> {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
SizedBox(width: 12),
|
||||||
Container(
|
Container(
|
||||||
padding: const EdgeInsets.all(6),
|
padding: const EdgeInsets.all(6),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(40),
|
borderRadius: BorderRadius.circular(40),
|
||||||
color: ColorPalette.investTypeBgColor[widget.investType] ?? Colors.white,
|
color: ColorPalette.investTypeBgColor[widget.selectedProduct.type] ?? Colors.white,
|
||||||
border: Border.all(width: 2, color: ColorPalette.investTypeColor[widget.investType] ?? Colors.white)
|
border: Border.all(width: 2, color: ColorPalette.investTypeColor[widget.selectedProduct.type] ?? Colors.white)
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
widget.investType,
|
widget.selectedProduct.type ?? '',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: ColorPalette.investTypeColor[widget.investType],
|
color: ColorPalette.investTypeColor[widget.selectedProduct.type],
|
||||||
fontWeight: FontWeight.w600
|
fontWeight: FontWeight.w600
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user