Skip to main content

Quickstart

Get the roomName for the meeting and the participant's authToken from our backend APIs (read more about our server APIs here), and pass them to Dyte's DyteMeeting widget.

  1. Import the package.
import 'package:dyte_client/dyte.dart';
import 'package:dyte_client/dyteMeeting.dart';
  1. Pass relevant information to DyteMeeting widget.
SizedBox(
width: <width>,
height: <height>,
child: DyteMeeting(
roomName: "<roomName>",
authToken: "<authToken>",
onInit: (DyteMeetingHandler meeting) async {
// your handler
},
)
)

You can use any constraining widget (not restricted to SizedBox), the parent widget just needs to have a maxHeight and maxWidth.

For example, for a full screen meeting you could use the following code.

import 'package:flutter/material.dart';
import 'package:dyte_client/dyte.dart';

void main() {
runApp(MaterialApp(home:MyApp()));
}

class MyApp extends StatefulWidget {

_MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {


void initState() {
super.initState();
}


Widget build(BuildContext context) {

// get the page height, width
double width = MediaQuery.of(context).size.width;
double height = MediaQuery.of(context).size.height;

return Scaffold(
body: Row(
children: <Widget>[
SizedBox(
width: width,
height: height,
child: DyteMeeting(
roomName: "<roomName>",
authToken: "<authToken>",
onInit: (DyteMeetingHandler meeting) async {
var self = await meeting.self;
},
)
)
],
),
);
}
}