Aidra Driver 1.3.5+68
Aidra Driver - Your path to green energy
Loading...
Searching...
No Matches
custom_text_form_field.dart
Go to the documentation of this file.
1import 'package:flutter/material.dart';
2
3import '../theme/color_palette.dart';
4
5class CustomTextFormField extends StatelessWidget {
7 super.key,
8 this.suffixIcon,
9 this.hintText,
10 this.validator,
11 this.controller,
12 this.keyboardType,
13 this.isObscure = false,
14 });
15
16 final Widget? suffixIcon;
18 final String? Function(String?)? validator;
19 final TextEditingController? controller;
20 final TextInputType? keyboardType;
21 final bool isObscure;
22
23 @override
24 Widget build(BuildContext context) {
25 return TextFormField(
26 obscureText: isObscure,
28 style: Theme.of(context).textTheme.displaySmall?.copyWith(
29 height: 0.0,
30 ),
31 cursorColor: ColorPalette.darkGreen,
32 decoration: InputDecoration(
33 labelText: hintText,
34 contentPadding: EdgeInsets.zero,
36 suffixIconColor: ColorPalette.grey,
37 border: const UnderlineInputBorder(),
39 hintStyle: Theme.of(context).textTheme.displaySmall?.copyWith(
41 height: 0.0,
42 ),
43 ),
45 validator: validator,
46 );
47 }
48}
static const darkGreen
static const grey
final TextEditingController controller
override Widget build(BuildContext context)
final String Function(String?)? validator
const CustomTextFormField({ super.key, this.suffixIcon, this.hintText, this.validator, this.controller, this.keyboardType, this.isObscure=false, })
final TextInputType keyboardType
class Partner String