cofounderella/lib/components/my_textfield.dart

41 lines
1.1 KiB
Dart

import 'package:flutter/material.dart';
class MyTextField extends StatelessWidget {
final String hintText;
final bool hideText;
final TextEditingController controller;
const MyTextField({
super.key,
required this.hintText,
required this.hideText,
required this.controller,
});
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.all(25.0),
child: TextField(
obscureText: hideText,
controller: controller,
decoration: InputDecoration(
enabledBorder: OutlineInputBorder(
borderSide:
BorderSide(color: Theme.of(context).colorScheme.tertiary),
),
focusedBorder: OutlineInputBorder(
borderSide:
BorderSide(color: Theme.of(context).colorScheme.primary),
),
fillColor: Theme.of(context).colorScheme.secondary,
filled: true,
hintText: hintText,
hintStyle: TextStyle(
color: Theme.of(context).colorScheme.primary,
)),
),
);
}
}