update
This commit is contained in:
parent
bac0d0da5b
commit
478b8e70f1
15 changed files with 374 additions and 148 deletions
31
lib/widgets/indicator_widget.dart
Normal file
31
lib/widgets/indicator_widget.dart
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:pharmacy_mobile/widgets/text_widget.dart';
|
||||
|
||||
class IndicatorWidget extends StatelessWidget {
|
||||
final String text;
|
||||
final Color? color;
|
||||
const IndicatorWidget({super.key, required this.text, this.color});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
height: 24,
|
||||
padding: EdgeInsets.symmetric(horizontal: 16),
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: color ?? const Color.fromRGBO(249, 249, 249, 1), width: 1),
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
color: color ?? const Color.fromRGBO(249, 249, 249, 1)),
|
||||
alignment: Alignment.center, // Center the text within the container
|
||||
child: TextWidget(
|
||||
text: text,
|
||||
size: 12,
|
||||
color: const Color.fromRGBO(0, 0, 0, 1),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -38,30 +38,46 @@ class ItemCardWidget extends StatelessWidget {
|
|||
const Gap(8),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Row(children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
TextWidget(
|
||||
text: text,
|
||||
size: 10,
|
||||
color: const Color.fromRGBO(0, 0, 0, 1),
|
||||
bold: true,
|
||||
),
|
||||
TextWidget(
|
||||
text: text,
|
||||
size: 16,
|
||||
color: Colors.black,
|
||||
)
|
||||
],
|
||||
),
|
||||
const Gap(92),
|
||||
TextWidget(
|
||||
text: quantity.toStringAsFixed(0),
|
||||
size: 12,
|
||||
color: const Color.fromRGBO(39, 39, 39, 1),
|
||||
)
|
||||
]),
|
||||
child: SizedBox(
|
||||
width: imageSize * 0.9,
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
TextWidget(
|
||||
text: text,
|
||||
size: 8,
|
||||
color: const Color.fromRGBO(0, 0, 0, 1),
|
||||
bold: true,
|
||||
),
|
||||
TextWidget(
|
||||
text: text,
|
||||
size: 12,
|
||||
color: Colors.black,
|
||||
)
|
||||
],
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.all(8),
|
||||
decoration: BoxDecoration(
|
||||
color: quantity > 20
|
||||
? const Color.fromRGBO(254, 160, 44, 1)
|
||||
: const Color.fromRGBO(136, 136, 136, 1),
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
border: Border.all(color: const Color.fromRGBO(217, 217, 217, 1)),
|
||||
),
|
||||
child: TextWidget(
|
||||
text: quantity.toStringAsFixed(0),
|
||||
size: 12,
|
||||
color:
|
||||
quantity > 20 ? const Color.fromRGBO(0, 0, 0, 1) : const Color.fromRGBO(255, 255, 255, 1),
|
||||
),
|
||||
)
|
||||
]),
|
||||
),
|
||||
),
|
||||
const Gap(8),
|
||||
Padding(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue