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