password static method
A password field with a lock icon, its text hidden.
Implementation
static FieldStyleTextField password({bool passwordViewable = true}) {
FieldStyleTextField baseStyle = base();
return baseStyle.copyWith(
prefixIcon: const Icon(Icons.lock_outline_rounded),
suffixIcon: passwordViewable
? IconButton(
icon: Icon(
passwordViewable ? Icons.visibility : Icons.visibility_off,
),
onPressed: () {},
)
: null,
obscureText: true,
obscuringCharacter: '*',
);
}