deewan 0.2.0 copy "deewan: ^0.2.0" to clipboard
deewan: ^0.2.0 copied to clipboard

Deewan video meetings for Flutter. Embed an end-to-end encrypted meeting in one widget, or build your own interface with every participant feature.

example/lib/main.dart

import 'package:deewan/deewan.dart';
import 'package:flutter/material.dart';

/// Opens a Deewan meeting from a join link.
///
/// Your server makes the link with `POST /rooms/{id}/join-links` (never put an
/// API key in an app) and hands it to the app; here it is pasted in.
void main() => runApp(const ExampleApp());

class ExampleApp extends StatelessWidget {
  const ExampleApp({super.key});

  @override
  Widget build(BuildContext context) => const MaterialApp(title: 'Deewan example', home: JoinScreen());
}

class JoinScreen extends StatefulWidget {
  const JoinScreen({super.key});

  @override
  State<JoinScreen> createState() => _JoinScreenState();
}

class _JoinScreenState extends State<JoinScreen> {
  final _link = TextEditingController();

  @override
  void dispose() {
    _link.dispose();
    super.dispose();
  }

  void _open() {
    final url = _link.text.trim();
    if (url.isEmpty) return;
    Navigator.of(context).push(
      MaterialPageRoute<void>(
        builder: (context) => Scaffold(
          body: SafeArea(
            child: DeewanMeetingView(
              joinUrl: url,
              onExit: (_) => Navigator.of(context).pop(),
              onError: (message) => ScaffoldMessenger.of(context).showSnackBar(SnackBar(content: Text(message))),
            ),
          ),
        ),
      ),
    );
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Deewan')),
      body: Padding(
        padding: const EdgeInsets.all(16),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.stretch,
          children: [
            TextField(controller: _link, decoration: const InputDecoration(labelText: 'Join link from your server')),
            const SizedBox(height: 12),
            FilledButton(onPressed: _open, child: const Text('Join meeting')),
          ],
        ),
      ),
    );
  }
}
0
likes
140
points
335
downloads

Documentation

Documentation
API reference

Publisher

verified publisherdeewan.io

Weekly Downloads

Deewan video meetings for Flutter. Embed an end-to-end encrypted meeting in one widget, or build your own interface with every participant feature.

Homepage

Topics

#video #webrtc #meetings #e2ee #livekit

License

MIT (license)

Dependencies

flutter, http, livekit_client, pointycastle, webview_flutter, webview_flutter_android, webview_flutter_wkwebview

More

Packages that depend on deewan