MeetingPasscodeComponent class

A stateless widget displaying a read-only meeting passcode in a styled text field.

Renders a labeled, non-editable text field showing the host passcode for the meeting. Typically displayed only to hosts/admins (islevel == '2') in MenuModal for security.

Rendering Structure:

Container (margin: 10px top, maxWidth: 300px)
  └─ Column (crossAxisAlignment: start)
     ├─ Text("Event Passcode (Host):", bold, dark gray)
     ├─ SizedBox(height: 5)
     └─ TextFormField
        ├─ initialValue: meetingPasscode
        ├─ readOnly: true
        ├─ border: OutlineInputBorder(rounded 5px, gray)
        ├─ fillColor: light gray
        └─ padding: 12px vertical, 10px horizontal

Common Use Cases:

  1. Display in Host Menu:

    // Only shown if user is host (islevel == '2')
    if (parameters.islevel == '2') ...[
      MeetingPasscodeComponent(
        options: MeetingPasscodeComponentOptions(
          meetingPasscode: parameters.meetingPasscode,
        ),
      ),
    ]
    
  2. Custom Styled for Emphasis:

    MeetingPasscodeComponent(
      options: MeetingPasscodeComponentOptions(
        meetingPasscode: "5678",
        labelStyle: TextStyle(
          color: Colors.orange[800],
          fontWeight: FontWeight.w600,
          fontSize: 14,
        ),
        inputTextStyle: TextStyle(
          color: Colors.orange[900],
          fontSize: 20,
          fontWeight: FontWeight.bold,
          letterSpacing: 3,
        ),
        inputBackgroundColor: Colors.orange[50],
      ),
    )
    
  3. In Host Credentials Dialog:

    Column(
      children: [
        Text("Host Credentials:", style: TextStyle(fontSize: 18)),
        SizedBox(height: 16),
        MeetingIdComponent(
          options: MeetingIdComponentOptions(
            meetingID: currentMeetingId,
          ),
        ),
        MeetingPasscodeComponent(
          options: MeetingPasscodeComponentOptions(
            meetingPasscode: hostPasscode,
          ),
        ),
        SizedBox(height: 16),
        Text(
          "Keep this passcode confidential",
          style: TextStyle(color: Colors.red, fontSize: 12),
        ),
      ],
    )
    

Styling Defaults:

  • Label: "Event Passcode (Host):", bold, Color.fromARGB(255, 51, 51, 51)
  • Input text: Black, default font size
  • Background: Color(0xFFF0F0F0) - light gray
  • Border: Rounded 5px, gray outline
  • Padding: 12px vertical, 10px horizontal
  • Max width: 300px (container constraint)

Security Considerations:

  • Should only be rendered for authenticated hosts (check islevel == '2')
  • Read-only field prevents accidental editing but allows text selection
  • Users can still copy passcode text for sharing
  • Consider masking passcode with obscureText option if needed (not implemented by default)

Field Behavior:

  • Read-only (readOnly: true) - user cannot edit
  • Uses TextFormField for consistent Material Design styling
  • No copy-to-clipboard button (users can select/copy text manually)
  • No validation (display-only field)
  • Plain text display (not obscured like password fields)

Typical Usage Context:

  • MenuModal host section (islevel == '2' only)
  • Host credentials screen
  • Meeting setup confirmation
  • Pre-meeting host instructions
Inheritance

Constructors

MeetingPasscodeComponent({Key? key, required MeetingPasscodeComponentOptions options})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
options MeetingPasscodeComponentOptions
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
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