const constructure
This commit is contained in:
@@ -40,8 +40,8 @@ class _VoidRightPanelState extends State<VoidRightPanel> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.all(20),
|
||||
decoration: BoxDecoration(
|
||||
padding: const EdgeInsets.all(20),
|
||||
decoration: const BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(width: 1, color: AppColor.border),
|
||||
),
|
||||
@@ -68,7 +68,7 @@ class _VoidRightPanelState extends State<VoidRightPanel> {
|
||||
thumbVisibility: true,
|
||||
child: SingleChildScrollView(
|
||||
controller: _scrollController,
|
||||
padding: EdgeInsets.all(20),
|
||||
padding: const EdgeInsets.all(20),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
@@ -79,7 +79,7 @@ class _VoidRightPanelState extends State<VoidRightPanel> {
|
||||
color: AppColor.primary,
|
||||
),
|
||||
),
|
||||
SpaceHeight(12),
|
||||
const SpaceHeight(12),
|
||||
VoidRadio(
|
||||
voidType: widget.state.voidType,
|
||||
value: VoidType.all,
|
||||
@@ -87,14 +87,14 @@ class _VoidRightPanelState extends State<VoidRightPanel> {
|
||||
subtitle: "Batalkan pesanan lengkap dan semua item",
|
||||
onChanged: (VoidType? value) {
|
||||
context.read<VoidFormBloc>().add(
|
||||
VoidFormEvent.clearSelectedItem(),
|
||||
const VoidFormEvent.clearSelectedItem(),
|
||||
);
|
||||
context.read<VoidFormBloc>().add(
|
||||
VoidFormEvent.voidTypeChanged(value!),
|
||||
);
|
||||
},
|
||||
),
|
||||
SpaceHeight(12),
|
||||
const SpaceHeight(12),
|
||||
VoidRadio(
|
||||
voidType: widget.state.voidType,
|
||||
value: VoidType.item,
|
||||
@@ -107,12 +107,12 @@ class _VoidRightPanelState extends State<VoidRightPanel> {
|
||||
);
|
||||
},
|
||||
),
|
||||
SpaceHeight(24),
|
||||
const SpaceHeight(24),
|
||||
|
||||
// Selected Items Summary (only show for item void)
|
||||
if (widget.state.voidType.isItem) ...[
|
||||
Container(
|
||||
padding: EdgeInsets.all(16),
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
color: widget.state.selectedItemQuantities.isEmpty
|
||||
? AppColor.warning.withOpacity(0.1)
|
||||
@@ -142,7 +142,7 @@ class _VoidRightPanelState extends State<VoidRightPanel> {
|
||||
: AppColor.success,
|
||||
size: 20,
|
||||
),
|
||||
SpaceWidth(8),
|
||||
const SpaceWidth(8),
|
||||
Expanded(
|
||||
child: Text(
|
||||
widget.state.selectedItemQuantities.isEmpty
|
||||
@@ -166,9 +166,11 @@ class _VoidRightPanelState extends State<VoidRightPanel> {
|
||||
.state
|
||||
.selectedItemQuantities
|
||||
.isNotEmpty) ...[
|
||||
SpaceHeight(12),
|
||||
const SpaceHeight(12),
|
||||
Container(
|
||||
constraints: BoxConstraints(maxHeight: 150),
|
||||
constraints: const BoxConstraints(
|
||||
maxHeight: 150,
|
||||
),
|
||||
child: Scrollbar(
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
@@ -188,10 +190,10 @@ class _VoidRightPanelState extends State<VoidRightPanel> {
|
||||
item.id == entry.key,
|
||||
);
|
||||
return Container(
|
||||
margin: EdgeInsets.only(
|
||||
margin: const EdgeInsets.only(
|
||||
bottom: 8,
|
||||
),
|
||||
padding: EdgeInsets.all(8),
|
||||
padding: const EdgeInsets.all(8),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius:
|
||||
@@ -247,9 +249,9 @@ class _VoidRightPanelState extends State<VoidRightPanel> {
|
||||
),
|
||||
),
|
||||
),
|
||||
Divider(height: 16, thickness: 1),
|
||||
const Divider(height: 16, thickness: 1),
|
||||
Container(
|
||||
padding: EdgeInsets.all(8),
|
||||
padding: const EdgeInsets.all(8),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.error,
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
@@ -282,7 +284,7 @@ class _VoidRightPanelState extends State<VoidRightPanel> {
|
||||
],
|
||||
),
|
||||
),
|
||||
SpaceHeight(24),
|
||||
const SpaceHeight(24),
|
||||
],
|
||||
|
||||
Text(
|
||||
@@ -292,7 +294,7 @@ class _VoidRightPanelState extends State<VoidRightPanel> {
|
||||
color: AppColor.primary,
|
||||
),
|
||||
),
|
||||
SpaceHeight(8),
|
||||
const SpaceHeight(8),
|
||||
AppTextFormField(
|
||||
label: 'Harap berikan alasan untuk membatalkan...',
|
||||
showLabel: false,
|
||||
@@ -303,7 +305,7 @@ class _VoidRightPanelState extends State<VoidRightPanel> {
|
||||
);
|
||||
},
|
||||
),
|
||||
SpaceHeight(32),
|
||||
const SpaceHeight(32),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -312,7 +314,7 @@ class _VoidRightPanelState extends State<VoidRightPanel> {
|
||||
|
||||
// Action Buttons
|
||||
Padding(
|
||||
padding: EdgeInsets.all(20),
|
||||
padding: const EdgeInsets.all(20),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
@@ -321,7 +323,7 @@ class _VoidRightPanelState extends State<VoidRightPanel> {
|
||||
label: 'Batal',
|
||||
),
|
||||
),
|
||||
SpaceWidth(12),
|
||||
const SpaceWidth(12),
|
||||
Expanded(
|
||||
child: AppElevatedButton.filled(
|
||||
onPressed: _canProcessVoid() ? _processVoid : null,
|
||||
|
||||
Reference in New Issue
Block a user