48 lines
1.5 KiB
Dart
48 lines
1.5 KiB
Dart
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))
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|