feat: optimize inventory in out dialog UI
This commit is contained in:
parent
504dc26ed4
commit
c9d6adc670
|
@ -3,4 +3,5 @@ class TextEnum {
|
||||||
static const String homeWelcomeText = '你好,';
|
static const String homeWelcomeText = '你好,';
|
||||||
static const String backToTodayButtonText = '今天';
|
static const String backToTodayButtonText = '今天';
|
||||||
static const String createInventoryInOutBtnText = '提交';
|
static const String createInventoryInOutBtnText = '提交';
|
||||||
|
static const String inventoryInOutDialogTitle = '出入库登记';
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ class DateContainer extends StatelessWidget {
|
||||||
return Obx(() => AnimatedContainer(
|
return Obx(() => AnimatedContainer(
|
||||||
duration: const Duration(milliseconds: 200),
|
duration: const Duration(milliseconds: 200),
|
||||||
height: ScreenAdaper.height(120),
|
height: ScreenAdaper.height(120),
|
||||||
width: ScreenAdaper.width(100),
|
width: ScreenAdaper.width(110),
|
||||||
margin: EdgeInsets.only(left: ScreenAdaper.width(size.width) * 0.05),
|
margin: EdgeInsets.only(left: ScreenAdaper.width(size.width) * 0.05),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
|
|
|
@ -25,7 +25,7 @@ class UperBody extends StatelessWidget {
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
scrollDirection: Axis.horizontal,
|
scrollDirection: Axis.horizontal,
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
bottom: ScreenAdaper.height(30), top: defaultPadding),
|
bottom: ScreenAdaper.height(20), top: defaultPadding),
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
return InkWell(
|
return InkWell(
|
||||||
borderRadius: BorderRadius.circular(ScreenAdaper.sp(20)),
|
borderRadius: BorderRadius.circular(ScreenAdaper.sp(20)),
|
||||||
|
|
|
@ -146,19 +146,21 @@ class InventoryInoutController extends GetxController {
|
||||||
/// 打开新建库存出入库对话框
|
/// 打开新建库存出入库对话框
|
||||||
Future<void> showInventoryInoutCreateDialog() async {
|
Future<void> showInventoryInoutCreateDialog() async {
|
||||||
final isTablet = Responsive.isTablet(Get.context!);
|
final isTablet = Responsive.isTablet(Get.context!);
|
||||||
|
print(isTablet);
|
||||||
isTablet
|
isTablet
|
||||||
? showGeneralDialog(
|
? showGeneralDialog(
|
||||||
context: Get.overlayContext!,
|
context: Get.overlayContext!,
|
||||||
barrierLabel: "Barrier",
|
barrierLabel: "CreateInventoryInout",
|
||||||
barrierDismissible: true,
|
barrierDismissible: true,
|
||||||
barrierColor: Colors.black.withOpacity(0.5),
|
|
||||||
transitionDuration: const Duration(milliseconds: 400),
|
transitionDuration: const Duration(milliseconds: 400),
|
||||||
pageBuilder: (_, __, ___) {
|
pageBuilder: (_, __, ___) {
|
||||||
return Center(
|
return Container(
|
||||||
|
margin: EdgeInsets.symmetric(
|
||||||
|
horizontal: ScreenAdaper.width(100),
|
||||||
|
vertical: ScreenAdaper.height(100)),
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(30),
|
borderRadius: BorderRadius.circular(30),
|
||||||
child: Material(child: NewInventoryInout()),
|
child: Material(child: NewInventoryInout())),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
transitionBuilder: (_, anim, __, child) {
|
transitionBuilder: (_, anim, __, child) {
|
||||||
|
|
|
@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_typeahead/flutter_typeahead.dart';
|
import 'package:flutter_typeahead/flutter_typeahead.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:sk_base_mobile/app_theme.dart';
|
import 'package:sk_base_mobile/app_theme.dart';
|
||||||
|
import 'package:sk_base_mobile/constants/constants.dart';
|
||||||
import 'package:sk_base_mobile/models/product.model.dart';
|
import 'package:sk_base_mobile/models/product.model.dart';
|
||||||
import 'package:sk_base_mobile/screens/new_inventory_inout/components/category_input.dart';
|
import 'package:sk_base_mobile/screens/new_inventory_inout/components/category_input.dart';
|
||||||
import 'package:sk_base_mobile/screens/new_inventory_inout/components/date_time.dart';
|
import 'package:sk_base_mobile/screens/new_inventory_inout/components/date_time.dart';
|
||||||
|
@ -69,13 +70,13 @@ class NewInventoryInout extends StatelessWidget {
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'出入库登记',
|
TextEnum.inventoryInOutDialogTitle,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: ScreenAdaper.sp(25),
|
fontSize: ScreenAdaper.sp(25),
|
||||||
fontWeight: FontWeight.w700,
|
fontWeight: FontWeight.w700,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Spacer(),
|
const Spacer(),
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Get.back();
|
Get.back();
|
||||||
|
|
Loading…
Reference in New Issue