fix: unify input field widths and fix button spacing in boxing page
- Unify all input fields (box number and quantity) to width 52 in both single-code and multi-code boxing modes - Flatten nested Row layout in multi-code submit row to ensure equal 8px spacing between quantity input, confirm button, and complete-box button Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2164,7 +2164,7 @@ class _BoxingPageState extends State<BoxingPage> with WidgetsBindingObserver {
|
|||||||
),
|
),
|
||||||
const SizedBox(width: 4),
|
const SizedBox(width: 4),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 70,
|
width: 52,
|
||||||
height: 34,
|
height: 34,
|
||||||
child: TextField(
|
child: TextField(
|
||||||
controller: _quantityController,
|
controller: _quantityController,
|
||||||
@@ -2762,12 +2762,6 @@ class _BoxingPageState extends State<BoxingPage> with WidgetsBindingObserver {
|
|||||||
Widget _buildManyToOneSubmitRow(bool hasScan, bool hasItems) {
|
Widget _buildManyToOneSubmitRow(bool hasScan, bool hasItems) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.fromLTRB(12, 7, 12, 8),
|
padding: const EdgeInsets.fromLTRB(12, 7, 12, 8),
|
||||||
child: Row(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
// Left half: quantity label + input + confirm
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: Row(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
@@ -2780,8 +2774,8 @@ class _BoxingPageState extends State<BoxingPage> with WidgetsBindingObserver {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 6),
|
const SizedBox(width: 6),
|
||||||
Expanded(
|
SizedBox(
|
||||||
child: SizedBox(
|
width: 52,
|
||||||
height: 34,
|
height: 34,
|
||||||
child: TextField(
|
child: TextField(
|
||||||
controller: _quantityController,
|
controller: _quantityController,
|
||||||
@@ -2789,11 +2783,12 @@ class _BoxingPageState extends State<BoxingPage> with WidgetsBindingObserver {
|
|||||||
enabled: hasScan && !_isSubmitting,
|
enabled: hasScan && !_isSubmitting,
|
||||||
keyboardType: TextInputType.none,
|
keyboardType: TextInputType.none,
|
||||||
inputFormatters: [FilteringTextInputFormatter.digitsOnly],
|
inputFormatters: [FilteringTextInputFormatter.digitsOnly],
|
||||||
|
textAlign: TextAlign.center,
|
||||||
onChanged: (_) => setState(() {}),
|
onChanged: (_) => setState(() {}),
|
||||||
onEditingComplete: () {},
|
onEditingComplete: () {},
|
||||||
onSubmitted: (_) => _submitFromKeyboard(),
|
onSubmitted: (_) => _submitFromKeyboard(),
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
contentPadding: const EdgeInsets.symmetric(horizontal: 10),
|
contentPadding: EdgeInsets.zero,
|
||||||
border: OutlineInputBorder(
|
border: OutlineInputBorder(
|
||||||
borderRadius: BorderRadius.circular(6),
|
borderRadius: BorderRadius.circular(6),
|
||||||
),
|
),
|
||||||
@@ -2818,7 +2813,6 @@ class _BoxingPageState extends State<BoxingPage> with WidgetsBindingObserver {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 34,
|
height: 34,
|
||||||
@@ -2854,13 +2848,8 @@ class _BoxingPageState extends State<BoxingPage> with WidgetsBindingObserver {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
// Right half: 完成本箱
|
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 1,
|
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
height: 34,
|
height: 34,
|
||||||
child: OutlinedButton(
|
child: OutlinedButton(
|
||||||
|
|||||||
Reference in New Issue
Block a user