CallCoreView class

Core call view component responsible for video rendering and interactive display of the call interface. Supports multi-layout switching (single-person float/multi-person grid/picture-in-picture), call waiting animations, and personalized configuration of volume, network status, and user avatars.

CallCoreView Core view component for displaying call screens. CallCoreView is the main container for the call interface, providing the following core capabilities:

  • Multi-Layout Switching: Supports switching between single-person float, multi-person grid, and picture-in-picture layouts.
  • Call Waiting Interaction: Supports custom waiting animations before call connection.
  • Status Visualization: Supports custom icons for different volume levels and network quality states.
  • User Personalization: Supports setting participant avatars through User ID mapping.

Key Features

  • Multi-Layout Switching:Supports switching between single-person float, multi-person grid, and picture-in-picture layouts
  • Call Waiting Interaction:Supports custom waiting animations before call connection
  • Status Visualization:Supports custom icons for different volume levels and network quality states
  • User Personalization:Supports setting participant avatars through User ID mapping

Note: This view component must be used together with CallStore to properly display call screens and receive call state updates.

Method Overview

Feature Method Description
Multi-Layout Switching controller.setLayoutTemplate Switch call interface layout (single-person float/multi-person grid/PiP)
Default Avatar defaultAvatar Set the default placeholder avatar widget
Loading Animation loadingAnimation Set the loading animation widget during call waiting state
Volume Icons volumeIcons Customize icons for each volume level
Network Icons networkQualityIcons Customize icons for each network quality level

Usage Example

import 'package:atomic_x_core/atomicxcore.dart';

// Create controller
final controller = CallCoreController.create();

// Create call view with configuration
CallCoreView(
  controller: controller,
  defaultAvatar: Icon(Icons.person),
  loadingAnimation: CircularProgressIndicator(),
  volumeIcons: {
    VolumeLevel.mute: Icon(Icons.volume_off),
    VolumeLevel.low: Icon(Icons.volume_down),
    VolumeLevel.medium: Icon(Icons.volume_up),
    VolumeLevel.high: Icon(Icons.volume_up),
    VolumeLevel.peak: Icon(Icons.volume_up),
  },
  networkQualityIcons: {
    NetworkQuality.unknown: Icon(Icons.signal_wifi_off),
    NetworkQuality.excellent: Icon(Icons.signal_wifi_4_bar),
    NetworkQuality.good: Icon(Icons.signal_wifi_4_bar),
    NetworkQuality.poor: Icon(Icons.network_wifi_3_bar),
    NetworkQuality.bad: Icon(Icons.network_wifi_2_bar),
    NetworkQuality.veryBad: Icon(Icons.network_wifi_1_bar),
    NetworkQuality.down: Icon(Icons.signal_wifi_off),
  },
);

// Set layout mode
controller.setLayoutTemplate(CallLayoutTemplate.grid);

Topics

Static Properties

Configuration Methods

See Also

Inheritance

Constructors

CallCoreView({Key? key, required CallCoreController controller, Widget? defaultAvatar, Widget? loadingAnimation, Map<VolumeLevel, Widget> volumeIcons = const {}, Map<NetworkQuality, Widget> networkQualityIcons = const {}})
Constructor and lifecycle methods for CallCoreView widget.
const

Properties

controller CallCoreController
The controller for managing call view layout and state.
final
defaultAvatar Widget?
Default placeholder avatar widget. Displayed when a participant has not set a specific avatar or when loading fails.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
loadingAnimation Widget?
Loading animation widget. Used to display waiting state before call connection.
final
networkQualityIcons Map<NetworkQuality, Widget>
Network signal icon collection. Defines widget resources for different network quality levels.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
volumeIcons Map<VolumeLevel, Widget>
Volume status icon collection. Defines widget resources for each volume level.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<CallCoreView>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited