label
This commit is contained in:
@@ -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,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user