Skip to content

Commit 332fa4a

Browse files
feat: Adds navigationDelegate for handling links
1 parent b7d6d0a commit 332fa4a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/src/chatbox.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ class ChatBox extends StatefulWidget {
7575
final TranslationToggledHandler? onTranslationToggled;
7676
final LoadingStateHandler? onLoadingStateChanged;
7777
final Map<String, MessageActionHandler>? onCustomMessageAction;
78+
final NavigationDelegate? navigationDelegate;
7879

7980
const ChatBox({
8081
Key? key,
@@ -93,6 +94,7 @@ class ChatBox extends StatefulWidget {
9394
this.onTranslationToggled,
9495
this.onLoadingStateChanged,
9596
this.onCustomMessageAction,
97+
this.navigationDelegate,
9698
}) : super(key: key);
9799

98100
@override
@@ -199,6 +201,7 @@ class ChatBoxState extends State<ChatBox> {
199201
// We need only the VerticalDragGestureRecognizer in order to be able to scroll through the messages
200202
Factory(() => VerticalDragGestureRecognizer()),
201203
},
204+
navigationDelegate: widget.navigationDelegate,
202205
);
203206
}
204207

0 commit comments

Comments
 (0)