|
|
@ -14,6 +14,7 @@ class ASEditTile extends StatelessWidget {
|
|
|
|
final List<TextInputFormatter>? inputFormatters;
|
|
|
|
final List<TextInputFormatter>? inputFormatters;
|
|
|
|
final TextInputType? keyBoardType;
|
|
|
|
final TextInputType? keyBoardType;
|
|
|
|
final TextStyle? hintTextStyle;
|
|
|
|
final TextStyle? hintTextStyle;
|
|
|
|
|
|
|
|
final Widget? suffix;
|
|
|
|
ASEditTile({
|
|
|
|
ASEditTile({
|
|
|
|
Key? key,
|
|
|
|
Key? key,
|
|
|
|
this.title,
|
|
|
|
this.title,
|
|
|
@ -23,13 +24,16 @@ class ASEditTile extends StatelessWidget {
|
|
|
|
this.onChange,
|
|
|
|
this.onChange,
|
|
|
|
this.onSubmitted,
|
|
|
|
this.onSubmitted,
|
|
|
|
this.inputFormatters,
|
|
|
|
this.inputFormatters,
|
|
|
|
this.keyBoardType, this.hintTextStyle,
|
|
|
|
this.keyBoardType,
|
|
|
|
|
|
|
|
this.hintTextStyle,
|
|
|
|
|
|
|
|
this.suffix,
|
|
|
|
}) : super(key: key);
|
|
|
|
}) : super(key: key);
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return ConstrainedBox(
|
|
|
|
return ConstrainedBox(
|
|
|
|
constraints: BoxConstraints(minHeight: 46.w),
|
|
|
|
constraints: BoxConstraints(minHeight: 46.w),
|
|
|
|
child: Row(
|
|
|
|
child: Row(
|
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
10.wb,
|
|
|
|
10.wb,
|
|
|
|
InkWell(
|
|
|
|
InkWell(
|
|
|
@ -41,12 +45,15 @@ class ASEditTile extends StatelessWidget {
|
|
|
|
child: title ?? Text(''),
|
|
|
|
child: title ?? Text(''),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
prefix ?? SizedBox(),
|
|
|
|
Offstage(
|
|
|
|
|
|
|
|
offstage: prefix == null,
|
|
|
|
|
|
|
|
child: prefix,
|
|
|
|
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
child: TextField(
|
|
|
|
child: TextField(
|
|
|
|
controller: controller,
|
|
|
|
controller: controller,
|
|
|
|
onChanged: onChange,
|
|
|
|
onChanged: onChange,
|
|
|
|
inputFormatters:inputFormatters,
|
|
|
|
inputFormatters: inputFormatters,
|
|
|
|
keyboardType: keyBoardType,
|
|
|
|
keyboardType: keyBoardType,
|
|
|
|
onSubmitted: onSubmitted,
|
|
|
|
onSubmitted: onSubmitted,
|
|
|
|
textAlign: TextAlign.end,
|
|
|
|
textAlign: TextAlign.end,
|
|
|
@ -60,7 +67,8 @@ class ASEditTile extends StatelessWidget {
|
|
|
|
isDense: true,
|
|
|
|
isDense: true,
|
|
|
|
contentPadding: EdgeInsets.zero,
|
|
|
|
contentPadding: EdgeInsets.zero,
|
|
|
|
hintText: hintText,
|
|
|
|
hintText: hintText,
|
|
|
|
hintStyle:hintTextStyle?? TextStyle(
|
|
|
|
hintStyle: hintTextStyle ??
|
|
|
|
|
|
|
|
TextStyle(
|
|
|
|
color: kTextSubColor,
|
|
|
|
color: kTextSubColor,
|
|
|
|
fontSize: 14.sp,
|
|
|
|
fontSize: 14.sp,
|
|
|
|
),
|
|
|
|
),
|
|
|
@ -68,6 +76,10 @@ class ASEditTile extends StatelessWidget {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
10.wb,
|
|
|
|
10.wb,
|
|
|
|
|
|
|
|
Offstage(
|
|
|
|
|
|
|
|
offstage: suffix == null,
|
|
|
|
|
|
|
|
child: suffix,
|
|
|
|
|
|
|
|
)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|