criada alguns widgets padrões e ajustada a tela de login
This commit is contained in:
46
lib/widgets/input_text.dart
Normal file
46
lib/widgets/input_text.dart
Normal file
@@ -0,0 +1,46 @@
|
||||
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,
|
||||
)
|
||||
)
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user