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