You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
838B

  1. import 'package:farm_tpf/utils/const_color.dart';
  2. import 'package:flutter/material.dart';
  3. class TextFieldAreaWidget extends StatelessWidget {
  4. final String hint;
  5. final TextEditingController controller;
  6. final Function onSaved;
  7. TextFieldAreaWidget(
  8. {@required this.hint, @required this.onSaved, @required this.controller});
  9. @override
  10. Widget build(BuildContext context) {
  11. return Container(
  12. padding: EdgeInsets.all(8),
  13. decoration: BoxDecoration(
  14. color: AppColors.YELLOW.withOpacity(0.1),
  15. borderRadius: BorderRadius.circular(8)),
  16. child: TextFormField(
  17. keyboardType: TextInputType.text,
  18. controller: controller,
  19. decoration: InputDecoration(
  20. labelText: hint, hintText: hint, border: InputBorder.none),
  21. onSaved: onSaved,
  22. ),
  23. );
  24. }
  25. }