forked from eatvio/eatvio_app
feat(order info): added order info screen
This commit is contained in:
@@ -33,8 +33,8 @@ class _OrderCardState extends State<OrderCard> {
|
||||
};
|
||||
final s = S.of(context);
|
||||
return Container(
|
||||
margin: EdgeInsets.symmetric(horizontal: 16),
|
||||
padding: EdgeInsets.only(top: 8, bottom: 12, left: 8, right: 8),
|
||||
margin: const EdgeInsets.symmetric(horizontal: 16),
|
||||
padding: const EdgeInsets.only(top: 8, bottom: 12, left: 8, right: 8),
|
||||
decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: appTheme.gray60004),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -47,7 +47,7 @@ class _OrderCardState extends State<OrderCard> {
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
child: Image.network(
|
||||
baseUrl + '/storage/' + widget.plan.image,
|
||||
'$baseUrl/storage/${widget.plan.image}',
|
||||
width: double.infinity,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
@@ -59,7 +59,7 @@ class _OrderCardState extends State<OrderCard> {
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 5),
|
||||
decoration: BoxDecoration(
|
||||
color: appTheme.blueA400,
|
||||
borderRadius: BorderRadius.only(
|
||||
borderRadius: const BorderRadius.only(
|
||||
topRight: Radius.circular(12),
|
||||
bottomRight: Radius.circular(12),
|
||||
),
|
||||
@@ -77,7 +77,7 @@ class _OrderCardState extends State<OrderCard> {
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 5),
|
||||
decoration: BoxDecoration(
|
||||
color: appTheme.greenA700,
|
||||
borderRadius: BorderRadius.only(
|
||||
borderRadius: const BorderRadius.only(
|
||||
topRight: Radius.circular(12),
|
||||
bottomRight: Radius.circular(12),
|
||||
),
|
||||
@@ -91,17 +91,17 @@ class _OrderCardState extends State<OrderCard> {
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
const SizedBox(height: 12),
|
||||
Text(
|
||||
'${widget.plan.name}',
|
||||
widget.plan.name,
|
||||
style: TextStyles.headingXLSemibold.copyWith(color: appTheme.black),
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
const SizedBox(height: 12),
|
||||
Text(
|
||||
'${s.option}: ${option?.short ?? ''}',
|
||||
style: TextStyles.textMSemibold.copyWith(color: appTheme.black),
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
const SizedBox(height: 8),
|
||||
if (option != null)
|
||||
...option.items
|
||||
.map(
|
||||
@@ -114,11 +114,11 @@ class _OrderCardState extends State<OrderCard> {
|
||||
),
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
,
|
||||
if (widget.isCustomerView) ...[
|
||||
SizedBox(height: 8),
|
||||
const SizedBox(height: 8),
|
||||
isLoading
|
||||
? Loader()
|
||||
? const Loader()
|
||||
: GestureDetector(
|
||||
onTap: () async {
|
||||
setState(() => isLoading = true);
|
||||
@@ -126,7 +126,7 @@ class _OrderCardState extends State<OrderCard> {
|
||||
setState(() => isLoading = false);
|
||||
},
|
||||
child: Text(
|
||||
'${s.cancel_order}',
|
||||
s.cancel_order,
|
||||
style: TextStyles.textSMedium.copyWith(color: appTheme.strongRed),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user