Files
rkmmobile/lib/widgets/input_text.dart

47 lines
1.1 KiB
Dart

import 'package:flutter/material.dart';
import 'package:rkm/utils/color_palette.dart';
class InputText extends StatelessWidget {
bool obscure;
var controller;
double fontSize;
String hint;
double width;
InputText({
required this.controller,
required this.width,
this.obscure = false,
this.fontSize = 20.0,
this.hint = '',
});
@override
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.symmetric(horizontal: 10),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
color: ColorPalette.border
),
width: width,
child: TextFormField(
obscureText: this.obscure,
controller: this.controller,
style: TextStyle(
color: ColorPalette.white,
fontSize: this.fontSize,
),
decoration: InputDecoration(
border: InputBorder.none,
hintText: this.hint,
hintStyle: TextStyle(
color: ColorPalette.white,
fontSize: this.fontSize,
)
)
),
);
}
}