SocritsRingScreen class

Prebuilt incoming/outgoing call (ring) screen for the Socrits UIKit.

You normally never build this yourself — SocritsCallUI shows it automatically on an incoming call and when you start one. It's exposed so you can theme it (via config.theme), show a real avatar (config.avatarUrl*), or replace it entirely (config.ringBuilder).

Shows the other party (avatar + name), a status line, pre-connect Speaker / Mic / Camera toggles (camera only for a video call), and the Accept/Decline (incoming) or Cancel (outgoing) actions.

Inheritance

Constructors

SocritsRingScreen({Key? key, required String title, required bool incoming, required bool video, String? subtitle, SocritsCallTheme theme = const SocritsCallTheme(), SocritsCallText text = const SocritsCallText(), Color? accent, String? avatarUrl, String? userId, SocritsAvatarBuilder? avatarBuilder, SocritsBackgroundBuilder? backgroundBuilder, bool initialMic = true, bool initialCam = true, bool initialSpeaker = true, ValueChanged<bool>? onMicChanged, ValueChanged<bool>? onCamChanged, ValueChanged<bool>? onSpeakerChanged, VoidCallback? onAccept, VoidCallback? onDecline, VoidCallback? onCancel})
const

Properties

accent → Color?
Back-compat convenience: overrides theme.accent when set.
final
avatarBuilder → SocritsAvatarBuilder?
Full custom avatar (takes precedence over avatarUrl).
final
avatarUrl → String?
The other party's avatar URL (falls back to the name's initial).
final
backgroundBuilder → SocritsBackgroundBuilder?
Custom background behind the ring screen (branded art, blur, gradient).
final
hashCode → int
The hash code for this object.
no setterinherited
incoming → bool
true = incoming (callee, shows Accept/Decline); false = outgoing (caller, shows Cancel).
final
initialCam → bool
final
initialMic → bool
final
initialSpeaker → bool
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onAccept → VoidCallback?
Accept (incoming only).
final
onCamChanged → ValueChanged<bool>?
final
onCancel → VoidCallback?
Cancel an outgoing call.
final
onDecline → VoidCallback?
Decline (incoming only).
final
onMicChanged → ValueChanged<bool>?
Pre-connect toggle callbacks — report the user's choice so the joined call starts in the same mic/camera/speaker state.
final
onSpeakerChanged → ValueChanged<bool>?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
subtitle → String?
Optional status line (defaults to "Incoming video call" / "Calling…").
final
text → SocritsCallText
User-visible strings (i18n).
final
theme → SocritsCallTheme
Colours + text styles.
final
title → String
Display name of the other party.
final
userId → String?
The other party's user id (passed to a custom avatarBuilder).
final
video → bool
Video call? Controls whether the camera toggle is shown.
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<SocritsRingScreen>
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