v1 release
This commit is contained in:
commit
cb24b68069
116 changed files with 4913 additions and 0 deletions
58
lib/presentation/widgets/auth/input_field.dart
Normal file
58
lib/presentation/widgets/auth/input_field.dart
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
import "package:flutter/material.dart";
|
||||
|
||||
class InputField extends StatelessWidget {
|
||||
final String label;
|
||||
final String placeholder;
|
||||
final TextInputAction inputAction;
|
||||
final String? Function(String?) validator;
|
||||
final void Function(String?) onSaved;
|
||||
final TextInputType? inputType;
|
||||
final bool? obscureText;
|
||||
|
||||
const InputField({
|
||||
super.key,
|
||||
required this.label,
|
||||
required this.placeholder,
|
||||
required this.inputAction,
|
||||
required this.validator,
|
||||
required this.onSaved,
|
||||
this.inputType,
|
||||
this.obscureText,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Text(
|
||||
label,
|
||||
style: Theme.of(context).textTheme.bodySmall!.copyWith(
|
||||
color: Theme.of(context).primaryColor,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
TextFormField(
|
||||
keyboardType: inputType,
|
||||
textInputAction: inputAction,
|
||||
obscureText: obscureText ?? false,
|
||||
validator: validator,
|
||||
onSaved: onSaved,
|
||||
style: Theme.of(context).textTheme.bodySmall!.copyWith(fontSize: 18),
|
||||
decoration: InputDecoration(
|
||||
filled: true,
|
||||
fillColor: const Color.fromRGBO(22, 39, 56, 1),
|
||||
hintText: placeholder,
|
||||
hintStyle: const TextStyle(
|
||||
color: Color.fromRGBO(127, 133, 141, 1),
|
||||
),
|
||||
errorStyle: const TextStyle(
|
||||
fontFamily: "Inter",
|
||||
fontSize: 16,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue