|
@@ -1,11 +1,8 @@
|
|
|
import 'package:fis_lib_report/converts/pt_to_px_converter.dart';
|
|
|
import 'package:fis_lib_report/converts/text_size_converter.dart';
|
|
|
-import 'package:fis_lib_report/converts/vertical_alignment.dart';
|
|
|
+import 'package:fis_lib_report/converts/alignment_convert.dart';
|
|
|
import 'package:fis_lib_report/report/inputText.dart';
|
|
|
-import 'package:fis_lib_report/report/interfaces/position_layout.dart';
|
|
|
-import 'package:flutter/cupertino.dart';
|
|
|
import 'package:flutter/material.dart';
|
|
|
-import 'package:flutter/rendering.dart';
|
|
|
|
|
|
class RInputText extends StatefulWidget {
|
|
|
final InputText inputText;
|
|
@@ -31,6 +28,7 @@ class _RInputTextState extends State<RInputText> {
|
|
|
Color _backgroundColor = const Color.fromARGB(255, 255, 255, 255);
|
|
|
int? _lineLength = 1;
|
|
|
TextStyle? _textStyle;
|
|
|
+
|
|
|
@override
|
|
|
initState() {
|
|
|
final fontColor = inputText.fontColor;
|
|
@@ -68,7 +66,7 @@ class _RInputTextState extends State<RInputText> {
|
|
|
);
|
|
|
return Container(
|
|
|
width: PtToPxConverter.ptToPx(_lineWidth!),
|
|
|
- height: _textWrap! ? _height! * 4 : (_height! + 5),
|
|
|
+ height: _textWrap! ? _height! * 4 : (_height! + 2),
|
|
|
padding: EdgeInsets.only(top: _textWrap! ? 10 : 5, right: 5, left: 5),
|
|
|
decoration: BoxDecoration(
|
|
|
border: Border.all(
|
|
@@ -77,11 +75,10 @@ class _RInputTextState extends State<RInputText> {
|
|
|
),
|
|
|
color: _backgroundColor,
|
|
|
),
|
|
|
- alignment: Alignment.center,
|
|
|
child: TextField(
|
|
|
focusNode: _focusNode,
|
|
|
readOnly: inputText.isReadOnly ?? false,
|
|
|
- cursorHeight: _height!,
|
|
|
+ // cursorHeight: _height!,
|
|
|
decoration: InputDecoration.collapsed(
|
|
|
hintText: '',
|
|
|
hintStyle: TextStyle(
|
|
@@ -89,12 +86,14 @@ class _RInputTextState extends State<RInputText> {
|
|
|
color: Colors.black54,
|
|
|
),
|
|
|
fillColor: _backgroundColor,
|
|
|
- filled: true,
|
|
|
+ filled: false,
|
|
|
+ ).copyWith(
|
|
|
+ contentPadding: EdgeInsets.symmetric(vertical: _textWrap! ? 2.5 : 4),
|
|
|
),
|
|
|
textAlignVertical: AlignmentConvert.verticalAlignmentConvert(
|
|
|
inputText.verticalAlignment),
|
|
|
+ minLines: 1,
|
|
|
maxLines: _textWrap! ? 6 : 1,
|
|
|
- minLines: _textWrap! ? 6 : 1,
|
|
|
controller: _controller,
|
|
|
textAlign: TextAlign.start,
|
|
|
style: _textStyle,
|
|
@@ -113,7 +112,7 @@ class _RInputTextState extends State<RInputText> {
|
|
|
if (inputText.tag!.name == 'HospitalName') {
|
|
|
if (_lineWidth! < width) {
|
|
|
setState(() {
|
|
|
- if (width < 500) {
|
|
|
+ if (width < 480) {
|
|
|
_lineWidth = width;
|
|
|
}
|
|
|
});
|
|
@@ -126,7 +125,7 @@ class _RInputTextState extends State<RInputText> {
|
|
|
.width >
|
|
|
inputText.lineWidth!) {
|
|
|
setState(() {
|
|
|
- if (width < 500) {
|
|
|
+ if (width < 480) {
|
|
|
_lineWidth = width;
|
|
|
}
|
|
|
});
|