livekit_client 2.3.2 copy "livekit_client: ^2.3.2" to clipboard
livekit_client: ^2.3.2 copied to clipboard

Flutter Client SDK for LiveKit. Build real-time video and audio into your apps. Supports iOS, Android, and Web.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_window_close/flutter_window_close.dart';
import 'package:livekit_client/livekit_client.dart';
import 'package:livekit_example/theme.dart';
import 'package:logging/logging.dart';
import 'package:intl/intl.dart';
import 'pages/connect.dart';
import 'utils.dart';

void main() async {
  final format = DateFormat('HH:mm:ss');
  // configure logs for debugging
  Logger.root.level = Level.FINE;
  Logger.root.onRecord.listen((record) {
    print('${format.format(record.time)}: ${record.message}');
  });

  WidgetsFlutterBinding.ensureInitialized();

  if (lkPlatformIsDesktop()) {
    await FlutterWindowClose.setWindowShouldCloseHandler(() async {
      await onWindowShouldClose?.call();
      return true;
    });
  }

  runApp(const LiveKitExampleApp());
}

class LiveKitExampleApp extends StatelessWidget {
  //
  const LiveKitExampleApp({
    super.key,
  });

  @override
  Widget build(BuildContext context) => MaterialApp(
        title: 'LiveKit Flutter Example',
        theme: LiveKitTheme().buildThemeData(context),
        home: const ConnectPage(),
      );
}
185
likes
150
points
16.9k
downloads

Publisher

verified publisherlivekit.io

Weekly Downloads

Flutter Client SDK for LiveKit. Build real-time video and audio into your apps. Supports iOS, Android, and Web.

Repository (GitHub)
View/report issues

Topics

#webrtc #voip #video #livestream #conference

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

async, collection, connectivity_plus, dart_webrtc, device_info_plus, fixnum, flutter, flutter_web_plugins, flutter_webrtc, http, js, logging, meta, platform_detect, protobuf, sdp_transform, synchronized, uuid, web

More

Packages that depend on livekit_client