22 lines
571 B
Dart
22 lines
571 B
Dart
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,
|
|
);
|
|
}
|
|
}
|