fix: continued product view
This commit is contained in:
@@ -53,7 +53,7 @@ class _InvestTypeViewState extends State<InvestTypeView> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
ButtonBack(),
|
||||
const ButtonBack(),
|
||||
TextTitle(title: widget.title, color: Colors.white),
|
||||
SizedBox(
|
||||
width: SizeConfig.width * 0.1,
|
||||
@@ -104,9 +104,9 @@ class _InvestTypeViewState extends State<InvestTypeView> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
segmentFilter(const Icon(Icons.filter_alt_outlined), 'Filter', () { }),
|
||||
segmentFilter(const RotatedBox(quarterTurns: 1, child: Icon(Icons.compare_arrows)), 'Sort', () { }),
|
||||
segmentFilter(const Icon(Icons.dashboard_outlined), 'Compare', () { }),
|
||||
segmentFilter(const Icon(Icons.filter_alt_outlined, color: ColorPalette.slate400,), 'Filter', () { }),
|
||||
segmentFilter(const RotatedBox(quarterTurns: 1, child: Icon(Icons.compare_arrows, color: ColorPalette.slate400)), 'Sort', () { }),
|
||||
segmentFilter(const Icon(Icons.dashboard_outlined, color: ColorPalette.slate400), 'Compare', () { }),
|
||||
],
|
||||
),
|
||||
);
|
||||
@@ -153,13 +153,13 @@ class _InvestTypeViewState extends State<InvestTypeView> {
|
||||
Row(
|
||||
children: [
|
||||
ImageView(image: PathAssets.imgProduct, width: SizeConfig.width * .12,),
|
||||
SizedBox(
|
||||
const SizedBox(
|
||||
width: 8,
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
product.name,
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 18
|
||||
),
|
||||
@@ -176,34 +176,34 @@ class _InvestTypeViewState extends State<InvestTypeView> {
|
||||
children: [
|
||||
Column(
|
||||
children: [
|
||||
Text('Yield', style: TextStyle(color: ColorPalette.slate400, fontWeight: FontWeight.w600),),
|
||||
const Text('Yield', style: TextStyle(color: ColorPalette.slate400, fontWeight: FontWeight.w600),),
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
'${product.yield.toString()}%',
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
color: ColorPalette.green400,
|
||||
fontWeight: FontWeight.w600
|
||||
),
|
||||
),
|
||||
Text('/'),
|
||||
Text('3year', style: TextStyle(color: ColorPalette.slate400, fontWeight: FontWeight.w600),)
|
||||
const Text('/'),
|
||||
const Text('3year', style: TextStyle(color: ColorPalette.slate400, fontWeight: FontWeight.w600),)
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
Text('Price/unit', style: TextStyle(color: ColorPalette.slate400, fontWeight: FontWeight.w600),),
|
||||
const Text('Price/unit', style: TextStyle(color: ColorPalette.slate400, fontWeight: FontWeight.w600),),
|
||||
Row(
|
||||
children: [
|
||||
Icon(Icons.trending_up_outlined, size: 18, color: ColorPalette.green400,),
|
||||
SizedBox(
|
||||
const Icon(Icons.trending_up_outlined, size: 18, color: ColorPalette.green400,),
|
||||
const SizedBox(
|
||||
width: 2,
|
||||
),
|
||||
Text(
|
||||
NumberFormatter.numberCurrency(product.priceUnit, 'Rp', 'id_ID'),
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.w600
|
||||
),
|
||||
),
|
||||
@@ -213,12 +213,12 @@ class _InvestTypeViewState extends State<InvestTypeView> {
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
Text('Managed funds', style: TextStyle(color: ColorPalette.slate400, fontWeight: FontWeight.w600),),
|
||||
const Text('Managed funds', style: TextStyle(color: ColorPalette.slate400, fontWeight: FontWeight.w600),),
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
NumberFormatter.compactCurrency(product.funds, 'Rp ', 'id_ID'),
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.w600
|
||||
),
|
||||
),
|
||||
|
||||
@@ -164,7 +164,7 @@ class _ProductViewState extends State<ProductView> {
|
||||
Expanded(
|
||||
child: Row(
|
||||
children: [
|
||||
ImageView(image: PathAssets.imgProduct, width: SizeConfig.width * .12,),
|
||||
ImageView(image: PathAssets.imgProduct, width: SizeConfig.width * .12),
|
||||
SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: Text(
|
||||
@@ -269,6 +269,10 @@ class _ProductViewState extends State<ProductView> {
|
||||
const SizedBox(
|
||||
height: 24,
|
||||
),
|
||||
moreAction(),
|
||||
const SizedBox(
|
||||
height: 24,
|
||||
),
|
||||
cardInformation('Time Machine', timeMachine()),
|
||||
const SizedBox(
|
||||
height: 24,
|
||||
@@ -509,6 +513,58 @@ class _ProductViewState extends State<ProductView> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget moreAction() {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: ButtonView(
|
||||
onPressed: () {
|
||||
|
||||
},
|
||||
prefixIcon: Icon(Icons.space_dashboard_sharp),
|
||||
backgroundColor: ColorPalette.blue50,
|
||||
sizeBorderRadius: 8,
|
||||
isSecondaryColor: false,
|
||||
width: SizeConfig.width * .5,
|
||||
heightWrapContent: true,
|
||||
isOutlined: true,
|
||||
widthPrefix: 10,
|
||||
name: 'Routine Savings',
|
||||
textSize: 14,
|
||||
textAlign: TextAlign.start,
|
||||
contentPadding: EdgeInsets.all(12),
|
||||
)
|
||||
),
|
||||
SizedBox(
|
||||
width: 16,
|
||||
),
|
||||
Expanded(
|
||||
child: ButtonView(
|
||||
onPressed: () {
|
||||
|
||||
},
|
||||
prefixIcon: Icon(Icons.space_dashboard_sharp, color: ColorPalette.orange500),
|
||||
widthPrefix: 10,
|
||||
name: 'Compare Mutual Funds',
|
||||
width: SizeConfig.width * .5,
|
||||
heightWrapContent: true,
|
||||
backgroundColor: ColorPalette.orange50,
|
||||
sizeBorderRadius: 8,
|
||||
isOutlined: true,
|
||||
borderColor: ColorPalette.orange500,
|
||||
textSize: 14,
|
||||
textAlign: TextAlign.start,
|
||||
textColor: ColorPalette.orange500,
|
||||
contentPadding: EdgeInsets.all(12),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget timeMachine() {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
|
||||
Reference in New Issue
Block a user