37 lines
1009 B
Dart
37 lines
1009 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:pwa_ios/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),
|
|
);
|
|
}
|
|
}
|