28 lines
966 B
Dart
28 lines
966 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:google_fonts/google_fonts.dart';
|
|
|
|
class InputWidget extends StatelessWidget {
|
|
final TextEditingController controller;
|
|
final String? placeholder;
|
|
final bool password;
|
|
|
|
const InputWidget({super.key, required this.controller, this.placeholder, required this.password});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return TextField(
|
|
controller: controller,
|
|
obscureText: password,
|
|
enableSuggestions: !password,
|
|
autocorrect: !password,
|
|
decoration: InputDecoration(
|
|
filled: true,
|
|
fillColor: const Color.fromRGBO(255, 255, 255, 1),
|
|
border: OutlineInputBorder(borderRadius: BorderRadius.circular(4)),
|
|
contentPadding: const EdgeInsets.symmetric(vertical: 0, horizontal: 14),
|
|
hintText: placeholder,
|
|
),
|
|
style: GoogleFonts.roboto(textStyle: const TextStyle(color: Color.fromRGBO(0, 0, 0, 1), fontSize: 16)),
|
|
);
|
|
}
|
|
}
|