|
|
@ -1,4 +1,5 @@
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
import 'package:flutter/services.dart';
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
import 'package:ansu_ui/styles/as_colors.dart';
|
|
|
|
import 'package:ansu_ui/styles/as_colors.dart';
|
|
|
|
import 'package:ansu_ui/extension/num_extension.dart';
|
|
|
|
import 'package:ansu_ui/extension/num_extension.dart';
|
|
|
@ -10,6 +11,9 @@ class ASEditTile extends StatelessWidget {
|
|
|
|
final TextEditingController? controller;
|
|
|
|
final TextEditingController? controller;
|
|
|
|
final Function(String text)? onChange;
|
|
|
|
final Function(String text)? onChange;
|
|
|
|
final Function(String text)? onSubmitted;
|
|
|
|
final Function(String text)? onSubmitted;
|
|
|
|
|
|
|
|
final List<FilteringTextInputFormatter>? inputFormatters;
|
|
|
|
|
|
|
|
final TextInputType? keyBoardType;
|
|
|
|
|
|
|
|
final TextStyle? hintTextStyle;
|
|
|
|
ASEditTile({
|
|
|
|
ASEditTile({
|
|
|
|
Key? key,
|
|
|
|
Key? key,
|
|
|
|
this.title,
|
|
|
|
this.title,
|
|
|
@ -18,6 +22,8 @@ class ASEditTile extends StatelessWidget {
|
|
|
|
this.prefix,
|
|
|
|
this.prefix,
|
|
|
|
this.onChange,
|
|
|
|
this.onChange,
|
|
|
|
this.onSubmitted,
|
|
|
|
this.onSubmitted,
|
|
|
|
|
|
|
|
this.inputFormatters,
|
|
|
|
|
|
|
|
this.keyBoardType, this.hintTextStyle,
|
|
|
|
}) : super(key: key);
|
|
|
|
}) : super(key: key);
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
@ -40,6 +46,8 @@ class ASEditTile extends StatelessWidget {
|
|
|
|
child: TextField(
|
|
|
|
child: TextField(
|
|
|
|
controller: controller,
|
|
|
|
controller: controller,
|
|
|
|
onChanged: onChange,
|
|
|
|
onChanged: onChange,
|
|
|
|
|
|
|
|
inputFormatters:inputFormatters,
|
|
|
|
|
|
|
|
keyboardType: keyBoardType,
|
|
|
|
onSubmitted: onSubmitted,
|
|
|
|
onSubmitted: onSubmitted,
|
|
|
|
textAlign: TextAlign.end,
|
|
|
|
textAlign: TextAlign.end,
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
@ -52,7 +60,7 @@ class ASEditTile extends StatelessWidget {
|
|
|
|
isDense: true,
|
|
|
|
isDense: true,
|
|
|
|
contentPadding: EdgeInsets.zero,
|
|
|
|
contentPadding: EdgeInsets.zero,
|
|
|
|
hintText: hintText,
|
|
|
|
hintText: hintText,
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
hintStyle:hintTextStyle?? TextStyle(
|
|
|
|
color: kTextSubColor,
|
|
|
|
color: kTextSubColor,
|
|
|
|
fontSize: 14.sp,
|
|
|
|
fontSize: 14.sp,
|
|
|
|
),
|
|
|
|
),
|
|
|
|