Appearance
Overview
- File:
lib/views/rapid_connect_page.dart
The rapid_connect_page.dart file implements the Rapid Connect interface for the HVC XR application. This page provides a streamlined way for users to join video calls using a unique join code, with features like session expiration handling and visual feedback.
Class Structure
dart
class RapidConnectPage extends StatelessWidget {
static const String routeName = '/RapidConnectPage';
final RapidConnectDto rapidConnectDto;
RapidConnectPage({Key? key, required this.rapidConnectDto}) : super(key: key);
}Dependencies
flutter/material.dart- Flutter UI componentsget/get.dart- State managementget/get_core/src/get_main.dart- GetX core functionality
Key Components
Controllers
meetingsController- Manages meeting state and rapid connect functionalityrealTimeController- Handles real-time communication for rapid connect
Data Model
RapidConnectDto- Contains rapid connect session information:uniqueId- Unique identifier for the sessionjoinCode- Code used to join the sessiondisplayName- Name displayed for the sessiondurationInSeconds- Session duration in seconds
Core Functionality
Rapid Connect Initialization
dart
realTimeController
.initRapidConnect(rapidConnectDto.uniqueId, rapidConnectDto.joinCode)
.then((value) {
if (value != null) {
if (value.success) {
HlkDialog.showSuccessSnackBar(
value.message ?? 'Rapid connect request sent successfully');
} else {
HlkDialog.showErrorSnackBar(
value.message ?? 'Rapid connect request failed');
}
}
});Timer Management
dart
var hasTimer = rapidConnectDto.durationInSeconds > 0;
if (hasTimer) meetingsController.initRapidConnectCounter();UI Components
Main Layout
- AppBar with dynamic title
- Centered content with join code display
- Progress indicator for session duration
Dynamic Elements
- Title changes based on timer state
- Join code display with conditional styling
- Progress bar showing session time remaining
State Management
- Uses GetX for reactive state management
- Manages timer state through
meetingsController - Handles rapid connect session state
Device Orientation
dart
return OrientationBuilder(builder: (context, orientation) {
// UI implementation
});Dependencies
get- State managementflutter/material.dart- UI components
Styling
- Follow application theme
- Use consistent text styles
- Implement responsive layouts
- Handle different screen sizes
- Support orientation changes
Integration Points
- Connects with
meetingsControllerfor session management - Integrates with
realTimeControllerfor communication - Uses
HlkDialogfor user notifications - Utilizes
HlkUtilsfor layout helpers