feat: submit data bank account
This commit is contained in:
@@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
|
||||
|
||||
class TextCaption extends StatelessWidget {
|
||||
final String title, subtitle;
|
||||
final TextAlign? textAlignSubtitle;
|
||||
final TextAlign? textAlign, textAlignSubtitle;
|
||||
final CrossAxisAlignment? crossAxisAlignment;
|
||||
const TextCaption({
|
||||
Key? key,
|
||||
@@ -11,6 +11,7 @@ class TextCaption extends StatelessWidget {
|
||||
this.subtitle = '',
|
||||
this.textAlignSubtitle,
|
||||
this.crossAxisAlignment,
|
||||
this.textAlign,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
@@ -23,6 +24,7 @@ class TextCaption extends StatelessWidget {
|
||||
children: [
|
||||
Text(
|
||||
title,
|
||||
textAlign: textAlign ?? TextAlign.start,
|
||||
style: const TextStyle(
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.w700,
|
||||
|
||||
@@ -81,123 +81,127 @@ class TextFormView extends StatelessWidget {
|
||||
if (inputFormatters != null && maxLength != null) {
|
||||
inputFormatters?.add(LengthLimitingTextInputFormatter(maxLength));
|
||||
}
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
name.isNotEmpty
|
||||
? validator != null
|
||||
? Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
name,
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
// color: ColorPalette.greyLight,
|
||||
),
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 8.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
name.isNotEmpty
|
||||
// ? validator != null
|
||||
? Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
name,
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: ColorPalette.slate800,
|
||||
),
|
||||
suffixLable ??
|
||||
const Text(
|
||||
"",
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: Colors.red,
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
: Text(
|
||||
name,
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
),
|
||||
)
|
||||
: const SizedBox(),
|
||||
trailingTitleWidget ?? const SizedBox(),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 8.0),
|
||||
TextFormField(
|
||||
focusNode: focusNode,
|
||||
onTapOutside: (event) => FocusScope.of(context).unfocus(),
|
||||
minLines: textrea ? 8 : 1,
|
||||
maxLines: textrea ? null : 1,
|
||||
initialValue: initialValue,
|
||||
enabled: enabled,
|
||||
controller: ctrl,
|
||||
maxLength: maxLength,
|
||||
keyboardType: keyboardType,
|
||||
onTap: onTap,
|
||||
onEditingComplete: onSubmit,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 14,
|
||||
color: fontColorDisabled ?? Colors.black,
|
||||
suffixLable ??
|
||||
const Text(
|
||||
"",
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: Colors.red,
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
: Text(
|
||||
name,
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
),
|
||||
),
|
||||
// : const SizedBox(),
|
||||
trailingTitleWidget ?? const SizedBox(),
|
||||
],
|
||||
),
|
||||
readOnly: readOnly,
|
||||
validator: validator,
|
||||
obscureText: obscureText,
|
||||
onChanged: onChanged,
|
||||
inputFormatters: inputFormatters ??
|
||||
[
|
||||
RemoveEmojiInputFormatter(),
|
||||
if (maxLength != null)
|
||||
LengthLimitingTextInputFormatter(maxLength)
|
||||
],
|
||||
enableInteractiveSelection: enableInteractiveSelection,
|
||||
textAlign: isTextAlignCenter ? TextAlign.center : TextAlign.left,
|
||||
decoration: InputDecoration(
|
||||
helperText: helperText,
|
||||
errorStyle: errorStyle,
|
||||
errorText: errorText,
|
||||
errorMaxLines: 2,
|
||||
hintStyle: hintTextStyle ??
|
||||
const TextStyle(
|
||||
fontSize: 14,
|
||||
color: ColorPalette.greyFont,
|
||||
fontWeight: FontWeight.normal,
|
||||
const SizedBox(height: 8.0),
|
||||
TextFormField(
|
||||
focusNode: focusNode,
|
||||
onTapOutside: (event) => FocusScope.of(context).unfocus(),
|
||||
minLines: textrea ? 8 : 1,
|
||||
maxLines: textrea ? null : 1,
|
||||
initialValue: initialValue,
|
||||
enabled: enabled,
|
||||
controller: ctrl,
|
||||
maxLength: maxLength,
|
||||
keyboardType: keyboardType,
|
||||
onTap: onTap,
|
||||
onEditingComplete: onSubmit,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 14,
|
||||
color: fontColorDisabled ?? Colors.black,
|
||||
),
|
||||
readOnly: readOnly,
|
||||
validator: validator,
|
||||
obscureText: obscureText,
|
||||
onChanged: onChanged,
|
||||
inputFormatters: inputFormatters ??
|
||||
[
|
||||
RemoveEmojiInputFormatter(),
|
||||
if (maxLength != null)
|
||||
LengthLimitingTextInputFormatter(maxLength)
|
||||
],
|
||||
enableInteractiveSelection: enableInteractiveSelection,
|
||||
textAlign: isTextAlignCenter ? TextAlign.center : TextAlign.left,
|
||||
decoration: InputDecoration(
|
||||
helperText: helperText,
|
||||
errorStyle: errorStyle,
|
||||
errorText: errorText,
|
||||
errorMaxLines: 2,
|
||||
hintStyle: hintTextStyle ??
|
||||
const TextStyle(
|
||||
fontSize: 14,
|
||||
color: ColorPalette.greyFont,
|
||||
fontWeight: FontWeight.normal,
|
||||
),
|
||||
isDense: true,
|
||||
hintText: hintText,
|
||||
filled: true,
|
||||
fillColor: enabled && disableColor == false
|
||||
? Colors.white
|
||||
: const Color.fromARGB(255, 233, 236, 239),
|
||||
disabledBorder: OutlineInputBorder(
|
||||
borderRadius: _borderRadius,
|
||||
borderSide: BorderSide(
|
||||
color: disabledborderColor ?? ColorPalette.greyBorder,
|
||||
),
|
||||
isDense: true,
|
||||
hintText: hintText,
|
||||
filled: true,
|
||||
fillColor: enabled && disableColor == false
|
||||
? Colors.white
|
||||
: const Color.fromARGB(255, 233, 236, 239),
|
||||
disabledBorder: OutlineInputBorder(
|
||||
borderRadius: _borderRadius,
|
||||
borderSide: BorderSide(
|
||||
color: disabledborderColor ?? ColorPalette.greyBorder,
|
||||
),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderRadius: _borderRadius,
|
||||
borderSide: BorderSide(
|
||||
color: enabledborderColor ?? ColorPalette.greyBorder,
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderRadius: _borderRadius,
|
||||
borderSide: BorderSide(
|
||||
color: enabledborderColor ?? ColorPalette.greyBorder,
|
||||
),
|
||||
),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderRadius: _borderRadius,
|
||||
borderSide: BorderSide(
|
||||
color: focusedBorderColor ?? ColorPalette.greyBorder,
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderRadius: _borderRadius,
|
||||
borderSide: BorderSide(
|
||||
color: focusedBorderColor ?? ColorPalette.greyBorder,
|
||||
),
|
||||
),
|
||||
),
|
||||
border: OutlineInputBorder(borderRadius: _borderRadius),
|
||||
suffixIcon: suffixIcon,
|
||||
prefixIcon: prefixIcon,
|
||||
suffixIconConstraints: suffixIconConstraints,
|
||||
prefixIconConstraints: preffixIconConstraints,
|
||||
prefix: prefix,
|
||||
contentPadding: contentPadding ?? const EdgeInsets.symmetric(
|
||||
horizontal: 8.0,
|
||||
vertical: 16.0,
|
||||
)
|
||||
),
|
||||
)
|
||||
],
|
||||
border: OutlineInputBorder(borderRadius: _borderRadius),
|
||||
suffixIcon: suffixIcon,
|
||||
prefixIcon: prefixIcon,
|
||||
suffixIconConstraints: suffixIconConstraints,
|
||||
prefixIconConstraints: preffixIconConstraints,
|
||||
prefix: prefix,
|
||||
contentPadding: contentPadding ??
|
||||
const EdgeInsets.symmetric(
|
||||
horizontal: 8.0,
|
||||
vertical: 16.0,
|
||||
)),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user