Initial Flutter project added
This commit is contained in:
35
lib/widgets/rounded_input.dart
Normal file
35
lib/widgets/rounded_input.dart
Normal file
@@ -0,0 +1,35 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class RoundedInput extends StatelessWidget {
|
||||
final TextEditingController controller;
|
||||
final String hint;
|
||||
final TextInputType keyboardType;
|
||||
final bool obscure;
|
||||
final int? maxLines;
|
||||
|
||||
const RoundedInput({
|
||||
super.key,
|
||||
required this.controller,
|
||||
required this.hint,
|
||||
this.keyboardType = TextInputType.text,
|
||||
this.obscure = false,
|
||||
this.maxLines = 1,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final radius = BorderRadius.circular(12);
|
||||
return TextField(
|
||||
controller: controller,
|
||||
keyboardType: keyboardType,
|
||||
obscureText: obscure,
|
||||
maxLines: maxLines,
|
||||
decoration: InputDecoration(
|
||||
filled: true,
|
||||
hintText: hint,
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14),
|
||||
border: OutlineInputBorder(borderRadius: radius, borderSide: BorderSide.none),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user