add carton editor for mix carton
This commit is contained in:
47
lib/pages/widgets/box_size_picker.dart
Normal file
47
lib/pages/widgets/box_size_picker.dart
Normal 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))
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user