add carton editor for mix carton

This commit is contained in:
tzw
2024-02-02 18:00:51 +06:30
parent 61f119c063
commit 891330a59e
18 changed files with 903 additions and 158 deletions

View File

@@ -0,0 +1,47 @@
import 'package:flutter/material.dart';
import '../../helpers/theme.dart';
import 'input_text.dart';
import 'local_text.dart';
class BoxSizePicker extends StatelessWidget {
final TextEditingController? controller;
final String lableKey;
final bool enable;
const BoxSizePicker(
{super.key, this.controller, required this.lableKey, this.enable = true});
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.only(right: 4),
child: Row(
children: [
Padding(
padding: const EdgeInsets.only(right: 8),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocalText(context, lableKey,
color: enable ? Colors.black : labelColor, fontSize: 15),
Text("inches",
style: TextStyle(color: labelColor, fontSize: 12))
],
),
),
Flexible(
child: InputText(
isDense: true,
enabled: enable,
textAlign: TextAlign.end,
controller: controller,
withBorder: true,
textInputType: TextInputType.number,
constraints: BoxConstraints(maxWidth: 50, maxHeight: 40),
contentPadding: EdgeInsets.all(7),
borderColor: enable ? primaryColor : labelColor))
],
),
);
}
}