|
@@ -39,7 +39,9 @@ class _RInputTextState extends State<RInputText> {
|
|
|
final inputTextInfo = ReportInfo.instance.getElementInfo(inputText);
|
|
|
_inputTextInfo = inputTextInfo as InputTextInfo;
|
|
|
if (inputText.isReadOnly!) {
|
|
|
- _controller.text = 'test';
|
|
|
+ if (_inputTextInfo!.tag!.name == 'ReportPhysician') {
|
|
|
+ _controller.text = ReportInfo.instance.reporter ?? '';
|
|
|
+ }
|
|
|
}
|
|
|
final fontColor = inputText.fontColor;
|
|
|
if (fontColor != null) {
|
|
@@ -61,9 +63,10 @@ class _RInputTextState extends State<RInputText> {
|
|
|
final fontStyles = inputText.fontStyles;
|
|
|
_lineLength = inputText.lineLength;
|
|
|
_lineWidth = inputText.lineWidth;
|
|
|
+
|
|
|
_textWrap = inputText.textWrap;
|
|
|
_fontSize = PtToPxConverter.ptToPx(inputText.fontSize);
|
|
|
- _height = _fontSize! > 30 ? 36.5 : 22;
|
|
|
+ _height = _fontSize! > 30 ? 43 : 22;
|
|
|
super.initState();
|
|
|
}
|
|
|
|
|
@@ -76,7 +79,7 @@ class _RInputTextState extends State<RInputText> {
|
|
|
return Container(
|
|
|
width: PtToPxConverter.ptToPx(_lineWidth!),
|
|
|
height: _textWrap! ? _height! * 4 : (_height!),
|
|
|
- padding: EdgeInsets.only(top: _textWrap! ? 10 : 5, right: 5, left: 5),
|
|
|
+ padding: const EdgeInsets.only(right: 5, left: 5),
|
|
|
decoration: BoxDecoration(
|
|
|
border: Border.all(
|
|
|
width: 1,
|
|
@@ -87,18 +90,7 @@ class _RInputTextState extends State<RInputText> {
|
|
|
child: TextField(
|
|
|
focusNode: _focusNode,
|
|
|
readOnly: inputText.isReadOnly ?? false,
|
|
|
- // cursorHeight: _height!,
|
|
|
- decoration: InputDecoration.collapsed(
|
|
|
- hintText: '',
|
|
|
- hintStyle: TextStyle(
|
|
|
- fontSize: _fontSize,
|
|
|
- color: Colors.black54,
|
|
|
- ),
|
|
|
- fillColor: _backgroundColor,
|
|
|
- filled: false,
|
|
|
- ).copyWith(
|
|
|
- contentPadding: EdgeInsets.symmetric(vertical: _textWrap! ? 2.5 : 4),
|
|
|
- ),
|
|
|
+ decoration: null,
|
|
|
textAlignVertical: AlignmentConvert.verticalAlignmentConvert(
|
|
|
inputText.verticalAlignment),
|
|
|
minLines: 1,
|
|
@@ -144,4 +136,10 @@ class _RInputTextState extends State<RInputText> {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ @override
|
|
|
+ void dispose() {
|
|
|
+ _controller.dispose();
|
|
|
+ super.dispose();
|
|
|
+ }
|
|
|
}
|