feat: Refactor OrderDetailsBottomBar to use UiButton for improved styling and consistency
This commit is contained in:
@@ -50,20 +50,8 @@ class OrderDetailsBottomBar extends StatelessWidget {
|
||||
if (bookingInProgress) {
|
||||
return SizedBox(
|
||||
width: double.infinity,
|
||||
child: ElevatedButton(
|
||||
child: UiButton.primary(
|
||||
onPressed: null,
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: UiColors.primary.withValues(alpha: 0.5),
|
||||
disabledBackgroundColor: UiColors.primary.withValues(alpha: 0.5),
|
||||
disabledForegroundColor: UiColors.white,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius.circular(UiConstants.radiusMdValue),
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: UiConstants.space3,
|
||||
),
|
||||
),
|
||||
child: const SizedBox(
|
||||
width: UiConstants.iconMd,
|
||||
height: UiConstants.iconMd,
|
||||
@@ -80,50 +68,18 @@ class OrderDetailsBottomBar extends StatelessWidget {
|
||||
if (spotsLeft <= 0) {
|
||||
return SizedBox(
|
||||
width: double.infinity,
|
||||
child: ElevatedButton(
|
||||
child: UiButton.primary(
|
||||
onPressed: null,
|
||||
style: ElevatedButton.styleFrom(
|
||||
disabledBackgroundColor: UiColors.bgThird,
|
||||
disabledForegroundColor: UiColors.textSecondary,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius.circular(UiConstants.radiusMdValue),
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: UiConstants.space3,
|
||||
),
|
||||
),
|
||||
child: Text(
|
||||
t.available_orders.fully_staffed,
|
||||
style: UiTypography.body2m.textSecondary,
|
||||
),
|
||||
text: t.available_orders.fully_staffed,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// Instant book or standard apply
|
||||
final bool isInstant = instantBook;
|
||||
return SizedBox(
|
||||
width: double.infinity,
|
||||
child: ElevatedButton(
|
||||
child: UiButton.primary(
|
||||
onPressed: onBook,
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: isInstant ? UiColors.success : UiColors.primary,
|
||||
foregroundColor: UiColors.white,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius.circular(UiConstants.radiusMdValue),
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: UiConstants.space3,
|
||||
),
|
||||
),
|
||||
child: Text(
|
||||
isInstant
|
||||
? t.available_orders.book_order
|
||||
: t.available_orders.apply,
|
||||
style: UiTypography.body2m.white,
|
||||
),
|
||||
text: t.available_orders.book_order,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user