diff --git a/packages/flutter_chat_ui/CHANGELOG.md b/packages/flutter_chat_ui/CHANGELOG.md index e1e5ead4..b6c6d193 100644 --- a/packages/flutter_chat_ui/CHANGELOG.md +++ b/packages/flutter_chat_ui/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.0.0-dev.5 + +- Add `hintText` to the `ChatInput` widget. + ## 2.0.0-dev.4 **⚠️ Breaking Changes ⚠️** diff --git a/packages/flutter_chat_ui/lib/src/chat_input.dart b/packages/flutter_chat_ui/lib/src/chat_input.dart index 6b502f50..48bc42ae 100644 --- a/packages/flutter_chat_ui/lib/src/chat_input.dart +++ b/packages/flutter_chat_ui/lib/src/chat_input.dart @@ -31,6 +31,7 @@ class ChatInput extends StatefulWidget { final Color? hintColor; final Color? textColor; final Color? inputFillColor; + final String? hintText; const ChatInput({ super.key, @@ -58,6 +59,7 @@ class ChatInput extends StatefulWidget { this.hintColor, this.textColor, this.inputFillColor, + this.hintText = 'Type a message', }); @override @@ -142,7 +144,7 @@ class _ChatInputState extends State { child: TextField( controller: _textController, decoration: InputDecoration( - hintText: 'Type a message', + hintText: widget.hintText, hintStyle: theme.typography.bodyMedium.copyWith( color: widget.hintColor ?? // ignore: deprecated_member_use