This commit is contained in:
Felipe
2024-02-20 17:11:43 -05:00
parent 29d18e93e0
commit e00772f58a
21 changed files with 386 additions and 279 deletions
+9 -16
View File
@@ -1,7 +1,9 @@
import 'package:flutter/material.dart';
import 'package:prosappco/components/general_input_decoration.dart';
class MyTextField extends StatelessWidget {
final TextEditingController controller;
final String? labelText;
final String hintText;
final bool obscureText;
final TextInputType keyboardType;
@@ -15,6 +17,7 @@ class MyTextField extends StatelessWidget {
const MyTextField(
{super.key,
this.labelText,
required this.controller,
required this.hintText,
required this.obscureText,
@@ -38,23 +41,13 @@ class MyTextField extends StatelessWidget {
onTap: onTap,
textInputAction: TextInputAction.next,
onChanged: onChanged,
decoration: InputDecoration(
suffixIcon: suffixIcon,
prefixIcon: prefixIcon,
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
borderSide: const BorderSide(color: Colors.transparent),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(20),
borderSide:
BorderSide(color: Theme.of(context).colorScheme.secondary),
),
fillColor: Colors.grey.shade200,
filled: true,
decoration: GeneralInputDecoration.getCustomDecoration(
labelText: labelText,
context: context,
hintText: hintText,
hintStyle: TextStyle(color: Colors.grey[500]),
errorText: errorMsg,
prefixIcon: prefixIcon,
errorMsg: errorMsg,
suffixIcon: suffixIcon,
),
);
}