Skip to content

Commit

Permalink
feat: make hintText available
Browse files Browse the repository at this point in the history
  • Loading branch information
demchenkoalex committed Feb 5, 2025
1 parent d49c01c commit 55e2e88
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/flutter_chat_ui/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.0.0-dev.5

- Add `hintText` to the `ChatInput` widget.

## 2.0.0-dev.4

**⚠️ Breaking Changes ⚠️**
Expand Down
4 changes: 3 additions & 1 deletion packages/flutter_chat_ui/lib/src/chat_input.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class ChatInput extends StatefulWidget {
final Color? hintColor;
final Color? textColor;
final Color? inputFillColor;
final String? hintText;

const ChatInput({
super.key,
Expand Down Expand Up @@ -58,6 +59,7 @@ class ChatInput extends StatefulWidget {
this.hintColor,
this.textColor,
this.inputFillColor,
this.hintText = 'Type a message',
});

@override
Expand Down Expand Up @@ -142,7 +144,7 @@ class _ChatInputState extends State<ChatInput> {
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
Expand Down

0 comments on commit 55e2e88

Please sign in to comment.