Change some ui in item filter

This commit is contained in:
hanie.khodkari
2025-05-24 16:55:59 +03:30
parent ffd4d36ac2
commit 35d468f008
2 changed files with 380 additions and 380 deletions
+104 -104
View File
@@ -132,110 +132,79 @@ class _ItemFilterScreenState extends State<ItemFilterScreen> {
SizedBox( SizedBox(
height: 20, height: 20,
), ),
Row( // Row(
children: [ // children: [
Flexible( // Flexible(
flex: 8, // flex: 8,
child: TextFormField( // child: TextFormField(
controller: idCTRL, // controller: idCTRL,
decoration: InputDecoration( // decoration: InputDecoration(
icon: Icon( // icon: Icon(
FontAwesomeIcons.sortNumericDown, // FontAwesomeIcons.sortNumericDown,
size: 6 * _deviceBlockSize, // size: 6 * _deviceBlockSize,
), // ),
labelStyle: TextStyle( // labelStyle: TextStyle(
fontWeight: FontWeight.w100, // fontWeight: FontWeight.w100,
fontSize: 4 * _deviceBlockSize, // fontSize: 4 * _deviceBlockSize,
), // ),
labelText: 'Item ID', // labelText: 'Item ID',
isDense: true, // isDense: true,
contentPadding: EdgeInsets.symmetric( // contentPadding: EdgeInsets.symmetric(
vertical: 2, // vertical: 2,
horizontal: 3, // horizontal: 3,
), // ),
), // ),
style: TextStyle( // style: TextStyle(
fontWeight: FontWeight.w700, // fontWeight: FontWeight.w700,
fontSize: 5 * _deviceBlockSize, // fontSize: 5 * _deviceBlockSize,
), // ),
keyboardType: TextInputType.number, // keyboardType: TextInputType.number,
textInputAction: TextInputAction.next, // textInputAction: TextInputAction.next,
onFieldSubmitted: (_) { // onFieldSubmitted: (_) {
FocusScope.of(context) // FocusScope.of(context)
.requestFocus(_itemNameFocusNode); // .requestFocus(_itemNameFocusNode);
}, // },
), // ),
), // ),
// Spacer(), // // Spacer(),
Flexible( // Flexible(
flex: 1, // flex: 1,
child: InkWell( // child: InkWell(
onTap: () { // onTap: () {
scan().then( // scan().then(
(String result) { // (String result) {
if (result == 'cancel') { // if (result == 'cancel') {
print('cancel'); // print('cancel');
} else if (result == 'error') { // } else if (result == 'error') {
print('error'); // print('error');
} else if (result == 'access') { // } else if (result == 'access') {
print('access'); // print('access');
} else { // } else {
print(result); // print(result);
idCTRL.text = result; // idCTRL.text = result;
} // }
}, // },
); // );
}, // },
child: Container( // child: Container(
padding: EdgeInsets.all(8), // padding: EdgeInsets.all(8),
decoration: BoxDecoration( // decoration: BoxDecoration(
shape: BoxShape.circle, // shape: BoxShape.circle,
color: Colors.black, // color: Colors.black,
), // ),
child: Icon( // child: Icon(
Icons.qr_code_scanner, // Icons.qr_code_scanner,
size: 5 * _deviceBlockSize, // size: 5 * _deviceBlockSize,
color: Colors.white, // color: Colors.white,
), // ),
), // ),
), // ),
), // ),
], // ],
), // ),
SizedBox( // SizedBox(
height: 30, // height: 30,
), // ),
TextFormField(
controller: nameCTRL,
decoration: InputDecoration(
icon: Icon(
FontAwesomeIcons.alignLeft,
size: 6 * _deviceBlockSize,
),
labelStyle: TextStyle(
fontWeight: FontWeight.w100,
fontSize: 4 * _deviceBlockSize,
),
labelText: 'Item Name',
isDense: true,
contentPadding: EdgeInsets.symmetric(
vertical: 2, horizontal: 3),
),
style: TextStyle(
fontWeight: FontWeight.w700,
fontSize: 5 * _deviceBlockSize,
),
focusNode: _itemNameFocusNode,
keyboardType: TextInputType.text,
textInputAction: TextInputAction.next,
onFieldSubmitted: (_) {
FocusScope.of(context)
.requestFocus(_itemUdiFocusNode);
},
),
SizedBox(
height: 30,
),
Row( Row(
children: [ children: [
Flexible( Flexible(
@@ -309,6 +278,37 @@ class _ItemFilterScreenState extends State<ItemFilterScreen> {
SizedBox( SizedBox(
height: 30.0, height: 30.0,
), ),
TextFormField(
controller: nameCTRL,
decoration: InputDecoration(
icon: Icon(
FontAwesomeIcons.alignLeft,
size: 6 * _deviceBlockSize,
),
labelStyle: TextStyle(
fontWeight: FontWeight.w100,
fontSize: 4 * _deviceBlockSize,
),
labelText: 'Item Name',
isDense: true,
contentPadding: EdgeInsets.symmetric(
vertical: 2, horizontal: 3),
),
style: TextStyle(
fontWeight: FontWeight.w700,
fontSize: 5 * _deviceBlockSize,
),
focusNode: _itemNameFocusNode,
keyboardType: TextInputType.text,
textInputAction: TextInputAction.next,
onFieldSubmitted: (_) {
FocusScope.of(context)
.requestFocus(_itemUdiFocusNode);
},
),
SizedBox(
height: 30,
),
TextFormField( TextFormField(
controller: sizeCTRL, controller: sizeCTRL,
decoration: InputDecoration( decoration: InputDecoration(
+104 -104
View File
@@ -101,110 +101,6 @@ class _MyItemsFilterScreenState extends State<MyItemsFilterScreen> {
SizedBox( SizedBox(
height: 20, height: 20,
), ),
Row(
children: [
Flexible(
flex: 8,
child: TextFormField(
controller: idCTRL,
decoration: InputDecoration(
icon: Icon(
FontAwesomeIcons.sortNumericDown,
size: 6 * _deviceBlockSize,
),
labelStyle: TextStyle(
fontWeight: FontWeight.w100,
fontSize: 4 * _deviceBlockSize,
),
labelText: 'Item ID',
isDense: true,
contentPadding: EdgeInsets.symmetric(
vertical: 2,
horizontal: 3,
),
),
style: TextStyle(
fontWeight: FontWeight.w700,
fontSize: 5 * _deviceBlockSize,
),
keyboardType: TextInputType.number,
textInputAction: TextInputAction.next,
onFieldSubmitted: (_) {
FocusScope.of(context)
.requestFocus(_itemNameFocusNode);
},
),
),
// Spacer(),
Flexible(
flex: 1,
child: InkWell(
onTap: () {
scan().then(
(String result) {
if (result == 'cancel') {
print('cancel');
} else if (result == 'error') {
print('error');
} else if (result == 'access') {
print('access');
} else {
print(result);
idCTRL.text = result;
}
},
);
},
child: Container(
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Colors.black,
),
child: Icon(
Icons.qr_code_scanner,
size: 5 * _deviceBlockSize,
color: Colors.white,
),
),
),
),
],
),
SizedBox(
height: 30,
),
TextFormField(
controller: nameCTRL,
decoration: InputDecoration(
icon: Icon(
FontAwesomeIcons.alignLeft,
size: 6 * _deviceBlockSize,
),
labelStyle: TextStyle(
fontWeight: FontWeight.w100,
fontSize: 4 * _deviceBlockSize,
),
labelText: 'Item Name',
isDense: true,
contentPadding: EdgeInsets.symmetric(
vertical: 2, horizontal: 3),
),
style: TextStyle(
fontWeight: FontWeight.w700,
fontSize: 5 * _deviceBlockSize,
),
focusNode: _itemNameFocusNode,
keyboardType: TextInputType.text,
textInputAction: TextInputAction.next,
onFieldSubmitted: (_) {
FocusScope.of(context)
.requestFocus(_itemUdiFocusNode);
},
),
SizedBox(
height: 30,
),
Row( Row(
children: [ children: [
Flexible( Flexible(
@@ -278,6 +174,110 @@ class _MyItemsFilterScreenState extends State<MyItemsFilterScreen> {
SizedBox( SizedBox(
height: 30.0, height: 30.0,
), ),
// Row(
// children: [
// Flexible(
// flex: 8,
// child: TextFormField(
// controller: idCTRL,
// decoration: InputDecoration(
// icon: Icon(
// FontAwesomeIcons.sortNumericDown,
// size: 6 * _deviceBlockSize,
// ),
// labelStyle: TextStyle(
// fontWeight: FontWeight.w100,
// fontSize: 4 * _deviceBlockSize,
// ),
// labelText: 'Item ID',
// isDense: true,
// contentPadding: EdgeInsets.symmetric(
// vertical: 2,
// horizontal: 3,
// ),
// ),
// style: TextStyle(
// fontWeight: FontWeight.w700,
// fontSize: 5 * _deviceBlockSize,
// ),
// keyboardType: TextInputType.number,
// textInputAction: TextInputAction.next,
// onFieldSubmitted: (_) {
// FocusScope.of(context)
// .requestFocus(_itemNameFocusNode);
// },
// ),
// ),
// // Spacer(),
// Flexible(
// flex: 1,
// child: InkWell(
// onTap: () {
// scan().then(
// (String result) {
// if (result == 'cancel') {
// print('cancel');
// } else if (result == 'error') {
// print('error');
// } else if (result == 'access') {
// print('access');
// } else {
// print(result);
// idCTRL.text = result;
// }
// },
// );
// },
// child: Container(
// padding: EdgeInsets.all(8),
// decoration: BoxDecoration(
// shape: BoxShape.circle,
// color: Colors.black,
// ),
// child: Icon(
// Icons.qr_code_scanner,
// size: 5 * _deviceBlockSize,
// color: Colors.white,
// ),
// ),
// ),
// ),
// ],
// ),
// SizedBox(
// height: 30,
// ),
TextFormField(
controller: nameCTRL,
decoration: InputDecoration(
icon: Icon(
FontAwesomeIcons.alignLeft,
size: 6 * _deviceBlockSize,
),
labelStyle: TextStyle(
fontWeight: FontWeight.w100,
fontSize: 4 * _deviceBlockSize,
),
labelText: 'Item Name',
isDense: true,
contentPadding: EdgeInsets.symmetric(
vertical: 2, horizontal: 3),
),
style: TextStyle(
fontWeight: FontWeight.w700,
fontSize: 5 * _deviceBlockSize,
),
focusNode: _itemNameFocusNode,
keyboardType: TextInputType.text,
textInputAction: TextInputAction.next,
onFieldSubmitted: (_) {
FocusScope.of(context)
.requestFocus(_itemUdiFocusNode);
},
),
SizedBox(
height: 30,
),
TextFormField( TextFormField(
controller: sizeCTRL, controller: sizeCTRL,
decoration: InputDecoration( decoration: InputDecoration(