mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-10 21:08:54 +03:30
55 lines
1.5 KiB
Dart
Executable File
55 lines
1.5 KiB
Dart
Executable File
import 'package:flutter/material.dart';
|
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
|
|
|
class LabelScanInputBox extends StatelessWidget {
|
|
const LabelScanInputBox({
|
|
Key? key,
|
|
required this.idCTRL,
|
|
required double deviceBlockSize,
|
|
}) : _deviceBlockSize = deviceBlockSize,
|
|
super(key: key);
|
|
|
|
final TextEditingController idCTRL;
|
|
final double _deviceBlockSize;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return TextFormField(
|
|
validator: (val) {
|
|
if (val!.isEmpty) {
|
|
return 'Id required!!';
|
|
}
|
|
return null;
|
|
},
|
|
controller: idCTRL,
|
|
decoration: InputDecoration(
|
|
icon: Icon(
|
|
FontAwesomeIcons.sortNumericDown,
|
|
size: 6 * _deviceBlockSize,
|
|
),
|
|
labelStyle: TextStyle(
|
|
fontWeight: FontWeight.w100,
|
|
fontSize: 4 * _deviceBlockSize,
|
|
),
|
|
labelText: 'Or enter a label ID',
|
|
isDense: true,
|
|
contentPadding: EdgeInsets.symmetric(
|
|
vertical: 2,
|
|
horizontal: 3,
|
|
),
|
|
focusedBorder: UnderlineInputBorder(
|
|
// borderRadius: BorderRadius.only(Radius.circular(4)),
|
|
borderSide: BorderSide(
|
|
color: Colors.grey,
|
|
),
|
|
),
|
|
),
|
|
style: TextStyle(
|
|
fontWeight: FontWeight.w700,
|
|
fontSize: 5 * _deviceBlockSize,
|
|
),
|
|
keyboardType: TextInputType.number,
|
|
);
|
|
}
|
|
}
|