import 'package:flutter/material.dart'; import 'package:manager_app/Components/text_field_container.dart'; import 'package:manager_app/constants.dart'; class RoundedInputField extends StatelessWidget { final String hintText; final IconData icon; final ValueChanged onChanged; final String initialValue; final Color color, textColor, iconColor; final int maxLength; const RoundedInputField({ Key key, this.hintText, this.initialValue, this.icon, this.color = kSecond, this.textColor = kBlack, this.iconColor = kPrimaryColor, this.onChanged, this.maxLength, // 50 }) : super(key: key); @override Widget build(BuildContext context) { return TextFieldContainer( color: color, child: TextFormField ( onChanged: onChanged, initialValue: initialValue, cursorColor: textColor, maxLength: maxLength, style: TextStyle(fontSize: 20, color: textColor), decoration: InputDecoration( icon: icon != null ? Icon( icon, color: iconColor, ): null, hintText: hintText, hintStyle: TextStyle(fontSize: 20.0, color: textColor), border: InputBorder.none, ) ), ); } }