feat: optimize
This commit is contained in:
parent
4c13315bb2
commit
88be83aceb
|
@ -160,7 +160,7 @@ class InventoryInoutCard extends StatelessWidget {
|
|||
|
||||
Widget buildContent() {
|
||||
return Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
|
@ -178,6 +178,7 @@ class InventoryInoutCard extends StatelessWidget {
|
|||
buildInOrOut()
|
||||
],
|
||||
),
|
||||
Spacer(),
|
||||
Text(
|
||||
controller.list[ind][index].product?.company?.name ?? '-',
|
||||
style: TextStyle(
|
||||
|
@ -192,7 +193,7 @@ class InventoryInoutCard extends StatelessWidget {
|
|||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
'项目: ${controller.list[ind][index].project?.name}',
|
||||
'${controller.list[ind][index].project?.name}',
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: ScreenAdaper.height(20)),
|
||||
|
@ -207,17 +208,17 @@ class InventoryInoutCard extends StatelessWidget {
|
|||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
'数量: ${controller.list[ind][index].quantity} ${controller.list[ind][index].product?.unit?.label ?? '-'}',
|
||||
'${controller.list[ind][index].quantity} ${controller.list[ind][index].product?.unit?.label ?? '-'}',
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: ScreenAdaper.height(25)),
|
||||
fontSize: ScreenAdaper.height(20)),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
controller.list[ind][index].agent ?? '-',
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: ScreenAdaper.height(25)),
|
||||
fontSize: ScreenAdaper.height(20)),
|
||||
),
|
||||
],
|
||||
)
|
||||
|
|
|
@ -174,16 +174,17 @@ class LoginScreen extends StatelessWidget {
|
|||
Widget buildUserNameInput() {
|
||||
return TextFormField(
|
||||
// 英文数字键盘
|
||||
keyboardType: TextInputType.text,
|
||||
// keyboardType: TextInputType.url,
|
||||
decoration: InputDecoration(
|
||||
prefixIcon: Icon(
|
||||
Icons.person_2_outlined,
|
||||
size: ScreenAdaper.height(40),
|
||||
),
|
||||
errorStyle: TextStyle(fontSize: ScreenAdaper.height(20)),
|
||||
// contentPadding: EdgeInsets.symmetric(
|
||||
// horizontal: ScreenAdaper.width(30),
|
||||
// vertical: ScreenAdaper.height(10)),
|
||||
contentPadding: EdgeInsets.symmetric(
|
||||
vertical: ScreenAdaper.height(10),
|
||||
horizontal: ScreenAdaper.width(30),
|
||||
),
|
||||
hintText: '用户名',
|
||||
hintStyle: TextStyle(fontSize: ScreenAdaper.height(25)),
|
||||
border: InputBorder.none,
|
||||
|
|
|
@ -138,14 +138,14 @@ class InventorySearch extends StatelessWidget {
|
|||
2: FlexColumnWidth(ScreenAdaper.screenShortDistance() / 4),
|
||||
3: MinColumnWidth(
|
||||
FixedColumnWidth(
|
||||
ScreenAdaper.screenShortDistance() / 8),
|
||||
ScreenAdaper.screenShortDistance() / 5),
|
||||
FixedColumnWidth(
|
||||
ScreenAdaper.screenShortDistance() / 8)),
|
||||
ScreenAdaper.screenShortDistance() / 5)),
|
||||
4: MinColumnWidth(
|
||||
FixedColumnWidth(
|
||||
ScreenAdaper.screenShortDistance() / 8),
|
||||
ScreenAdaper.screenShortDistance() / 6),
|
||||
FixedColumnWidth(
|
||||
ScreenAdaper.screenShortDistance() / 8)),
|
||||
ScreenAdaper.screenShortDistance() / 6)),
|
||||
}, children: [
|
||||
// table header
|
||||
TableRow(
|
||||
|
@ -270,10 +270,11 @@ class InventorySearch extends StatelessWidget {
|
|||
}
|
||||
if (onInventorySelected != null) onInventorySelected!(itemData);
|
||||
},
|
||||
child: Container(
|
||||
constraints: BoxConstraints(minHeight: ScreenAdaper.height(80)),
|
||||
alignment: alignment ?? Alignment.centerLeft,
|
||||
child: child),
|
||||
child: AbsorbPointer(
|
||||
child: Container(
|
||||
constraints: BoxConstraints(minHeight: ScreenAdaper.height(80)),
|
||||
alignment: alignment ?? Alignment.centerLeft,
|
||||
child: child)),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -43,9 +43,6 @@ class ZtSearchSelect<T> extends StatelessWidget {
|
|||
return TextFormField(
|
||||
focusNode: focusNode,
|
||||
controller: _,
|
||||
onTapOutside: (event) {
|
||||
FocusScope.of(context).unfocus();
|
||||
},
|
||||
decoration: InputDecoration(
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: const BorderSide(
|
||||
|
|
Loading…
Reference in New Issue