From ffb7c91c81a671d248d203df7074541551391dd2 Mon Sep 17 00:00:00 2001 From: Deven Joshi Date: Thu, 29 Jul 2021 18:23:51 +0530 Subject: [PATCH] added code highlighting --- .../docs/Flutter/guides/customize_text_messages.mdx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docusaurus/docs/Flutter/guides/customize_text_messages.mdx b/docusaurus/docs/Flutter/guides/customize_text_messages.mdx index f0fb1ac0..a2d37333 100644 --- a/docusaurus/docs/Flutter/guides/customize_text_messages.mdx +++ b/docusaurus/docs/Flutter/guides/customize_text_messages.mdx @@ -24,7 +24,7 @@ separately, follow the same process without the `.copyWith` and use the default First, add a `MessageListView` in the appropriate place where you intend to display messages from a channel. -``` +```dart MessageListView( ... ) @@ -41,7 +41,7 @@ however, this quickly becomes hard to maintain as more parameters and customizat default message implementation as aforementioned. ::: -``` +```dart MessageListView( ... messageBuilder: (context, messageDetails, messageList, defaultWidget) { @@ -52,7 +52,7 @@ MessageListView( We use `.copyWith()` to customize the widget: -``` +```dart MessageListView( ... messageBuilder: (context, messageDetails, messageList, defaultWidget) { @@ -69,7 +69,7 @@ If you intend to simply change the theme for the text, you need not recreate the `MessageWidget` has a `messageTheme` parameter that allows you to pass the theme for most aspects of the message. -``` +```dart MessageListView( ... messageBuilder: (context, messageDetails, messageList, defaultWidget) { @@ -86,7 +86,7 @@ MessageListView( If you want to replace the entire text widget in the `MessageWidget`, you can use the `textBuilder` parameter which provides a builder for creating a widget to substitute the default text.parameter -``` +```dart MessageListView( ... messageBuilder: (context, messageDetails, messageList, defaultWidget) { @@ -103,7 +103,7 @@ MessageListView( To add elements like hashtags, we can override the `textBuilder` in the MessageWidget: -``` +```dart MessageListView( ... messageBuilder: (context, messageDetails, messageList, defaultWidget) {