This commit is contained in:
Patrick Alvin Alcala 2025-03-11 10:41:04 +08:00
parent 55de28532f
commit ff619ac88a
13 changed files with 192 additions and 145 deletions

View file

@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:gap/gap.dart';
import 'package:pharmacy_mobile/widgets/text_widget.dart';
import 'package:intl/intl.dart';
@ -7,6 +8,7 @@ import 'package:redacted/redacted.dart';
class ItemCardWidget extends StatelessWidget {
final String imageUrl;
final String text;
final String subtext;
final double price;
final double quantity;
final bool isLoading;
@ -15,6 +17,7 @@ class ItemCardWidget extends StatelessWidget {
{super.key,
required this.imageUrl,
required this.text,
required this.subtext,
required this.price,
required this.quantity,
required this.isLoading});
@ -48,7 +51,7 @@ class ItemCardWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TextWidget(
text: text,
text: subtext,
size: 8,
color: const Color.fromRGBO(0, 0, 0, 1),
bold: true,
@ -84,18 +87,38 @@ class ItemCardWidget extends StatelessWidget {
const Gap(8),
Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
children: [
Image.asset('assets/php_logo.webp',
fit: BoxFit.cover, height: 12, cacheHeight: (12 * MediaQuery.of(context).devicePixelRatio).round()),
const Gap(4),
TextWidget(
text: NumberFormat.currency(locale: "en_US", symbol: "").format(price),
size: 16,
bold: true,
color: fontColor,
),
],
child: SizedBox(
width: imageSize * 0.9,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
Image.asset('assets/php_logo.webp',
fit: BoxFit.cover,
height: 12,
cacheHeight: (12 * MediaQuery.of(context).devicePixelRatio).round()),
const Gap(4),
TextWidget(
text: NumberFormat.currency(locale: "en_US", symbol: "").format(price),
size: 16,
bold: true,
color: fontColor,
),
],
),
Container(
padding: const EdgeInsets.symmetric(vertical: 4, horizontal: 16),
decoration: BoxDecoration(
border: Border.all(color: Colors.black),
borderRadius: BorderRadius.circular(20),
),
child: FaIcon(
FontAwesomeIcons.cartShopping,
size: 12,
))
],
),
),
)
],