Chat UIKit Flutter v3
Chat UIKit Flutter
Chat UIKit
Flutter
Version 3

Customize string resources

Copy link

The string resource contains all strings that appear on UIKit modules. You can customize these strings by using the SBUStringProvider().setStrings() method.

Set strings

Copy link
// Set all strings.
SBUStringProvider().setStrings(
  SBUStrings(
    // ...
  ),
);

// Set a string.
SBUStringProvider().strings.channels = 'YOUR_CHANNELS_STRING';

Handle dynamic updates

Copy link

To handle dynamic updates to text strings within your app, utilize the ChangeNotifier of SBUStringProvider. This setup allows widgets to rebuild automatically whenever text strings change.

@override
Widget build(BuildContext context) {
  SBUStringProvider stringProvider = context.watch<SBUStringProvider>();
  SBUStrings strings = stringProvider.strings;
}