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