Skip to content

RtkProvider

Last updated View as MarkdownAgent setup

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(),
      ),
    );
  }
}

Was this helpful?