66 lines
1.9 KiB
Dart
66 lines
1.9 KiB
Dart
/// Price Negotiation Section Widget
|
|
///
|
|
/// Optional price negotiation checkbox.
|
|
library;
|
|
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
|
import 'package:worker/core/constants/ui_constants.dart';
|
|
import 'package:worker/core/theme/colors.dart';
|
|
|
|
/// Price Negotiation Section
|
|
///
|
|
/// Allows user to request price negotiation instead of direct order.
|
|
class PriceNegotiationSection extends HookWidget {
|
|
final ValueNotifier<bool> needsNegotiation;
|
|
|
|
const PriceNegotiationSection({
|
|
super.key,
|
|
required this.needsNegotiation,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
margin: const EdgeInsets.symmetric(horizontal: AppSpacing.md),
|
|
padding: const EdgeInsets.all(AppSpacing.md),
|
|
decoration: BoxDecoration(
|
|
color: const Color(0xFFFFF8E1),
|
|
borderRadius: BorderRadius.circular(AppRadius.card),
|
|
border: Border.all(color: const Color(0xFFFFD54F)),
|
|
),
|
|
child: Row(
|
|
children: [
|
|
Checkbox(
|
|
value: needsNegotiation.value,
|
|
onChanged: (value) {
|
|
needsNegotiation.value = value ?? false;
|
|
},
|
|
activeColor: AppColors.warning,
|
|
),
|
|
const Expanded(
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text(
|
|
'Đàm phán giá',
|
|
style: TextStyle(
|
|
fontSize: 15,
|
|
fontWeight: FontWeight.w600,
|
|
color: Color(0xFF212121),
|
|
),
|
|
),
|
|
SizedBox(height: 4),
|
|
Text(
|
|
'Gửi yêu cầu đàm phán giá cho đơn hàng này',
|
|
style: TextStyle(fontSize: 13, color: AppColors.grey500),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|