const constructure
This commit is contained in:
@@ -35,7 +35,7 @@ class CustomerCard extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
CircleAvatar(
|
||||
const CircleAvatar(
|
||||
radius: 22,
|
||||
backgroundColor: AppColor.primary,
|
||||
child: Icon(Icons.person, color: Colors.white),
|
||||
|
||||
@@ -20,21 +20,21 @@ class ErrorCard extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(Icons.error_outline, size: 48, color: Colors.red.shade400),
|
||||
SizedBox(height: 16),
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
title,
|
||||
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600),
|
||||
style: const TextStyle(fontSize: 16, fontWeight: FontWeight.w600),
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
const SizedBox(height: 8),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 32),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 32),
|
||||
child: Text(
|
||||
message,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(color: Colors.grey.shade600),
|
||||
style: const TextStyle(color: Colors.grey),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 16),
|
||||
const SizedBox(height: 16),
|
||||
AppElevatedButton.filled(
|
||||
width: 120,
|
||||
onPressed: onTap,
|
||||
|
||||
@@ -84,7 +84,7 @@ class OrderCard extends StatelessWidget {
|
||||
const SizedBox(height: 12),
|
||||
Row(
|
||||
children: [
|
||||
CircleAvatar(
|
||||
const CircleAvatar(
|
||||
radius: 22,
|
||||
backgroundColor: AppColor.primary,
|
||||
child: Icon(Icons.person, color: Colors.white),
|
||||
@@ -107,7 +107,7 @@ class OrderCard extends StatelessWidget {
|
||||
const SizedBox(height: 4),
|
||||
Row(
|
||||
children: [
|
||||
Icon(
|
||||
const Icon(
|
||||
Icons.table_bar,
|
||||
size: 16,
|
||||
color: AppColor.textSecondary,
|
||||
@@ -145,7 +145,7 @@ class OrderCard extends StatelessWidget {
|
||||
),
|
||||
Text(
|
||||
(order.createdAt).toFormattedDateTime(),
|
||||
style: TextStyle(color: AppColor.black),
|
||||
style: const TextStyle(color: AppColor.black),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -182,7 +182,7 @@ class OrderCard extends StatelessWidget {
|
||||
),
|
||||
child: Text(
|
||||
(order.status).toUpperCase(),
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
color: AppColor.success,
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 12,
|
||||
@@ -199,7 +199,7 @@ class OrderCard extends StatelessWidget {
|
||||
),
|
||||
child: Text(
|
||||
(order.status).toUpperCase(),
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
color: AppColor.textSecondary,
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 12,
|
||||
|
||||
@@ -50,7 +50,7 @@ class _OrderMenuState extends State<OrderMenu> {
|
||||
child: ListTile(
|
||||
contentPadding: EdgeInsets.zero,
|
||||
leading: ClipRRect(
|
||||
borderRadius: BorderRadius.all(Radius.circular(8.0)),
|
||||
borderRadius: const BorderRadius.all(Radius.circular(8.0)),
|
||||
child: AppNetworkImage(
|
||||
url: widget.data.product.imageUrl,
|
||||
width: 50.0,
|
||||
@@ -150,7 +150,7 @@ class _OrderMenuState extends State<OrderMenu> {
|
||||
),
|
||||
],
|
||||
),
|
||||
SpaceHeight(8.0),
|
||||
const SpaceHeight(8.0),
|
||||
SizedBox(
|
||||
height: 40,
|
||||
child: Row(
|
||||
@@ -160,7 +160,9 @@ class _OrderMenuState extends State<OrderMenu> {
|
||||
cursorColor: AppColor.primary,
|
||||
controller: _controller,
|
||||
style: const TextStyle(fontSize: 12, color: AppColor.black),
|
||||
decoration: InputDecoration(hintText: 'Catatan Pesanan'),
|
||||
decoration: const InputDecoration(
|
||||
hintText: 'Catatan Pesanan',
|
||||
),
|
||||
),
|
||||
),
|
||||
const SpaceWidth(16.0),
|
||||
@@ -180,7 +182,10 @@ class _OrderMenuState extends State<OrderMenu> {
|
||||
color: AppColor.primary,
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
),
|
||||
child: Icon(Icons.delete_outline, color: AppColor.white),
|
||||
child: const Icon(
|
||||
Icons.delete_outline,
|
||||
color: AppColor.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -13,7 +13,7 @@ class OutletCard extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 12.0),
|
||||
margin: EdgeInsets.only(bottom: 12),
|
||||
margin: const EdgeInsets.only(bottom: 12),
|
||||
decoration: BoxDecoration(
|
||||
color: isSelected ? AppColor.primary.withOpacity(0.1) : AppColor.white,
|
||||
border: Border.all(color: AppColor.primary),
|
||||
@@ -21,8 +21,8 @@ class OutletCard extends StatelessWidget {
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(Icons.store, color: AppColor.primary),
|
||||
SpaceWidth(12),
|
||||
const Icon(Icons.store, color: AppColor.primary),
|
||||
const SpaceWidth(12),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
|
||||
@@ -28,7 +28,7 @@ class PaymentCard extends StatelessWidget {
|
||||
),
|
||||
checkmarkColor: AppColor.white,
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(color: AppColor.primary),
|
||||
side: const BorderSide(color: AppColor.primary),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
|
||||
|
||||
@@ -44,7 +44,7 @@ class ProductCard extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.all(Radius.circular(8.0)),
|
||||
borderRadius: const BorderRadius.all(Radius.circular(8.0)),
|
||||
child: product.imageUrl == ""
|
||||
? Container(
|
||||
width: double.infinity,
|
||||
@@ -71,7 +71,7 @@ class ProductCard extends StatelessWidget {
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
SpaceHeight(4),
|
||||
const SpaceHeight(4),
|
||||
Align(
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
@@ -82,7 +82,7 @@ class ProductCard extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
SpaceHeight(4),
|
||||
const SpaceHeight(4),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -126,7 +126,7 @@ class ProductCard extends StatelessWidget {
|
||||
Container(
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(8.0)),
|
||||
borderRadius: const BorderRadius.all(Radius.circular(8.0)),
|
||||
color: AppColor.disabled.withOpacity(0.5),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user