Methods
Utility Methods

Utility Methods

Other App Utility Methods for meeting use-case

NameType
setDisplayName(displayName: string)FunctionSet the display name of the current user
changeAvatarUrl(avatarUrl: string)FunctionSet the avatar url of the current user
sendData(peerIds: [] | "*", data: unknown)FunctionSend data to the specified peerIds or all peers if '*' is passed as peerIds

Example

meeting_screen.dart
import 'package:flutter/material.dart';
import 'package:huddle01_flutter_client/huddle_client.dart';
 
 
class MeetingScreen extends StatefulWidget {
  ...
}
 
class _MeetingScreenState extends State<MeetingScreen> {
  late HuddleClient huddleClient;
 
  @override
  void initState() {
    ...
  }
 
  @override
  Widget build(BuildContext context) {
    return Column(
      children:[
        ElevatedButton(
          onPressed:(){
            huddleClient.setDisplayName("axit.eth");
          },
          child: const Text("Set Display Name"),
        ),
        ElevatedButton(
          onPressed:(){
            huddleClient.changeAvatarUrl("https://youravatarurl.com/avatar.png");
          },
          child: const Text("Change Avatar Url"),
        ),
        ElevatedButton(
          onPressed:(){
            huddleClient.sendData("*", { "hello": "world" });
          },
          child: const Text("Send Data"),
        ),
      ]
    );
  }
}
Audio/Video Infrastructure designed for the developers to empower them ship simple yet powerful Audio/Video Apps.
support
company
Copyright © 2024 Graphene 01, Inc. All Rights Reserved.