import 'package:flutter/material.dart'; class MyTextFormField extends StatelessWidget { final String _description; final Function(String?) onSaveAction; const MyTextFormField( this._description, this.onSaveAction, { super.key, }); @override Widget build(BuildContext context) { return TextFormField( onSaved: onSaveAction, decoration: InputDecoration(hintText: _description), validator: (String? value) => value == null || value.isEmpty ? 'Text eingeben' : null, keyboardType: TextInputType.multiline, maxLines: null, ); } }