logo
On this page

Modify User Interface text

Live Streaming Kit (ZegoUIKitPrebuiltLiveStreaming)'s UI text provided by the internal components is editable, to modify those, use the ZegoUIKitPrebuiltLiveStreamingInnerText config.

Here is the reference code:

Untitled
class LivePage extends StatelessWidget {
  const LivePage({Key? key, required this.liveID, this.isHost = false})
      : super(key: key);

  final String liveID;
  final bool isHost;

  @override
  Widget build(BuildContext context) {
    return SafeArea(
      child: ZegoUIKitPrebuiltLiveStreaming(
        appID: YourSecret.appID,
        appSign: YourSecret.appSign,
        userID: userID,
        userName: 'user_$userID',
        liveID: liveID,

        // Modify your custom configurations here.
        config: isHost
            ? ZegoUIKitPrebuiltLiveStreamingConfig.host()
            : ZegoUIKitPrebuiltLiveStreamingConfig.audience()
          ..innerText.startLiveStreamingButton = 'Start Live'
          ..innerText.noHostOnline = 'No host online'
          ..confirmDialogInfo = isHost
              ? ZegoLiveStreamingDialogInfo(
                  title: "Stop the live",
                  message: "Are you sure to stop the live?",
                  cancelButtonName: "Cancel",
                  confirmButtonName: "Stop it",
                )
              : null,
      ),
    );
  }
}
1
Copied!

On this page

Back to top