feat: add otp code for sell order
fix: form for segmentation
This commit is contained in:
@@ -200,6 +200,7 @@ class _RTextFieldState extends State<RTextField> {
|
||||
padding: widget.padding ?? EdgeInsets.zero,
|
||||
child: TextFormField(
|
||||
controller: widget.controller,
|
||||
|
||||
focusNode: widget.focusNode,
|
||||
textAlign: widget.textAlign ?? TextAlign.start,
|
||||
readOnly: widget.readonly,
|
||||
|
||||
@@ -20,7 +20,8 @@ class UnitTextField extends StatefulWidget {
|
||||
this.textStyle,
|
||||
this.textColor,
|
||||
this.inputFormatters,
|
||||
this.validator
|
||||
this.validator,
|
||||
this.autoValidateMode,
|
||||
});
|
||||
|
||||
final String hint;
|
||||
@@ -34,6 +35,7 @@ class UnitTextField extends StatefulWidget {
|
||||
final TextInputAction? textInputAction;
|
||||
final List<TextInputFormatter>? inputFormatters;
|
||||
final FormFieldValidator<String>? validator;
|
||||
final AutovalidateMode? autoValidateMode;
|
||||
final bool? enabled;
|
||||
final bool? readOnly;
|
||||
final int? maxLines;
|
||||
@@ -62,7 +64,7 @@ class _UnitTextFieldState extends State<UnitTextField> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
height: 40,
|
||||
constraints: const BoxConstraints(minHeight: 40),
|
||||
width: MediaQuery.of(context).size.width,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||
decoration: BoxDecoration(
|
||||
@@ -76,7 +78,7 @@ class _UnitTextFieldState extends State<UnitTextField> {
|
||||
Text(
|
||||
widget.hint,
|
||||
style:
|
||||
widget.textStyle?.copyWith(color: widget.textColor) ??
|
||||
widget.textStyle?.copyWith(color: widget.textColor) ??
|
||||
AppFonts.yekan14.copyWith(color: widget.textColor ?? AppColor.textColorLight),
|
||||
),
|
||||
|
||||
@@ -85,7 +87,7 @@ class _UnitTextFieldState extends State<UnitTextField> {
|
||||
Expanded(
|
||||
child: TextFormField(
|
||||
controller: tmpController,
|
||||
keyboardType: TextInputType.number,
|
||||
keyboardType: widget.keyboardType ?? TextInputType.number,
|
||||
textInputAction: widget.textInputAction,
|
||||
onChanged: widget.onChanged,
|
||||
enabled: widget.enabled,
|
||||
@@ -95,11 +97,13 @@ class _UnitTextFieldState extends State<UnitTextField> {
|
||||
textDirection: TextDirection.ltr,
|
||||
inputFormatters: widget.inputFormatters,
|
||||
validator: widget.validator,
|
||||
autovalidateMode: widget.autoValidateMode,
|
||||
style: AppFonts.yekan18.copyWith(color: AppColor.darkGreyNormalActive),
|
||||
decoration: const InputDecoration(
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
border: InputBorder.none,
|
||||
contentPadding: EdgeInsets.symmetric(vertical: 8),
|
||||
contentPadding: const EdgeInsets.symmetric(vertical: 8),
|
||||
errorMaxLines: 2,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -114,6 +114,7 @@ class _MonthlyDataCalendarState extends State<MonthlyDataCalendar> {
|
||||
isToday: date.year == today.year && date.month == today.month && date.day == today.day,
|
||||
isEnabled: isEnabled,
|
||||
hasZeroValue: hasZeroValue,
|
||||
remainingStock: data?.value ?? 0,
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -396,6 +397,7 @@ class DayInfo {
|
||||
final bool isToday;
|
||||
final bool isEnabled;
|
||||
final bool hasZeroValue;
|
||||
final int remainingStock;
|
||||
|
||||
DayInfo({
|
||||
required this.date,
|
||||
@@ -404,6 +406,7 @@ class DayInfo {
|
||||
required this.isToday,
|
||||
required this.isEnabled,
|
||||
required this.hasZeroValue,
|
||||
required this.remainingStock,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user