Skip to content

Latest commit

 

History

History
62 lines (51 loc) · 2.12 KB

File metadata and controls

62 lines (51 loc) · 2.12 KB
pcx_content_type navigation
title RtkProvider
description API reference for RtkProvider component (Flutter Library)
products
realtime

A foundational widget that initializes and provides the RealtimeKit environment for a Flutter application. RtkProvider acts as a context wrapper that sets up design tokens, client configurations, and UI Kit information required by RealtimeKit components.

Properties

Property Type Required Default Description
child Widget - The widget below this widget in the tree
meeting RealtimekitClient - Meeting client instance
uiKitInfo RealtimeKitUIInfo - UI Kit configuration info including design tokens and UI settings
observers List<ProviderObserver>? null Riverpod provider observers for debugging

Usage Examples

Basic Usage

import 'package:realtimekit_ui/realtimekit_ui.dart';

RtkProvider(
  meeting: yourMeetingInstance,
  uiKitInfo: yourUiKitInfo,
  child: MaterialApp(
    home: YourAppHome(),
  ),
)

With Properties

import 'package:realtimekit_ui/realtimekit_ui.dart';

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return RtkProvider(
      meeting: RealtimekitClient(
        // Client configuration
      ),
      uiKitInfo: RealtimeKitUIInfo(
        // UI Kit information and design tokens
      ),
      observers: [MyProviderObserver()],
      child: MaterialApp(
        home: HomeScreen(),
      ),
    );
  }
}

:::note You do not need to wrap the root of your application inside RtkProvider. You can wrap a specific subtree where you use RealtimeKit components. A MaterialApp widget must exist below RtkProvider in the widget tree. :::