KonectarEvents/lib/widgets/customtextfield.dart

40 lines
1.1 KiB
Dart
Raw Permalink 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) {
2024-10-07 12:45:45 +00:00
return SizedBox(
height: 50,
child: 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),
),
2024-09-06 06:30:31 +00:00
);
}
}