KonectarApp/lib/widgets/customtextfield.dart

37 lines
1017 B
Dart
Raw Normal View History

2024-09-06 06:30:31 +00:00
import 'package:flutter/material.dart';
import 'package:konectar_events/utils/util.dart';
class CustomTextField extends StatelessWidget {
String labelText;
TextEditingController controller;
String? hintText;
IconButton? suffixIcon;
bool? enabled = true;
bool? obscure = false;
CustomTextField(
{super.key,
required this.controller,
this.hintText,
required this.labelText,
this.suffixIcon,
this.enabled,
this.obscure});
@override
Widget build(BuildContext context) {
return TextField(
controller: controller,
style: TextStyle(fontSize: isTablet ? 18.0 : 16),
enabled: enabled,
obscureText: obscure ?? false,
decoration: InputDecoration(
border: const OutlineInputBorder(),
labelStyle: TextStyle(fontSize: isTablet ? 18.0 : 16),
labelText: labelText,
hintStyle: TextStyle(fontSize: isTablet ? 18.0 : 16),
suffixIcon: suffixIcon,
hintText: hintText),
);
}
}