refactor of usecases
This commit is contained in:
@@ -113,6 +113,9 @@ class UiColors {
|
||||
/// Inactive text (#9CA3AF)
|
||||
static const Color textInactive = Color(0xFF9CA3AF);
|
||||
|
||||
/// Disabled text color (#9CA3AF)
|
||||
static const Color textDisabled = textInactive;
|
||||
|
||||
/// Placeholder text (#9CA3AF)
|
||||
static const Color textPlaceholder = Color(0xFF9CA3AF);
|
||||
|
||||
@@ -151,6 +154,9 @@ class UiColors {
|
||||
/// Inactive icon (#D1D5DB)
|
||||
static const Color iconInactive = Color(0xFFD1D5DB);
|
||||
|
||||
/// Disabled icon color (#D1D5DB)
|
||||
static const Color iconDisabled = iconInactive;
|
||||
|
||||
/// Active icon (#0A39DF)
|
||||
static const Color iconActive = primary;
|
||||
|
||||
|
||||
@@ -130,6 +130,9 @@ class UiIcons {
|
||||
/// Wallet icon
|
||||
static const IconData wallet = _IconLib.wallet;
|
||||
|
||||
/// Bank icon
|
||||
static const IconData bank = _IconLib.landmark;
|
||||
|
||||
/// Credit card icon
|
||||
static const IconData creditCard = _IconLib.creditCard;
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ class UiTextField extends StatelessWidget {
|
||||
this.suffix,
|
||||
this.readOnly = false,
|
||||
this.onTap,
|
||||
this.validator,
|
||||
});
|
||||
/// The label text to display above the text field.
|
||||
final String? label;
|
||||
@@ -76,6 +77,9 @@ class UiTextField extends StatelessWidget {
|
||||
/// Callback when the text field is tapped.
|
||||
final VoidCallback? onTap;
|
||||
|
||||
/// Optional validator for the text field.
|
||||
final String? Function(String?)? validator;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
@@ -86,18 +90,19 @@ class UiTextField extends StatelessWidget {
|
||||
Text(label!, style: UiTypography.body4m.textSecondary),
|
||||
const SizedBox(height: UiConstants.space1),
|
||||
],
|
||||
TextField(
|
||||
TextFormField(
|
||||
controller: controller,
|
||||
onChanged: onChanged,
|
||||
keyboardType: keyboardType,
|
||||
maxLines: maxLines,
|
||||
obscureText: obscureText,
|
||||
textInputAction: textInputAction,
|
||||
onSubmitted: onSubmitted,
|
||||
onFieldSubmitted: onSubmitted,
|
||||
autofocus: autofocus,
|
||||
inputFormatters: inputFormatters,
|
||||
readOnly: readOnly,
|
||||
onTap: onTap,
|
||||
validator: validator,
|
||||
style: UiTypography.body1r.textPrimary,
|
||||
decoration: InputDecoration(
|
||||
hintText: hintText,
|
||||
|
||||
Reference in New Issue
Block a user