Skip to content

Commit

Permalink
rename files.
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudwebrtc committed Oct 24, 2024
1 parent 9b682db commit f2028f5
Show file tree
Hide file tree
Showing 32 changed files with 117 additions and 92 deletions.
12 changes: 6 additions & 6 deletions lib/livekit_components.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
library livekit_components;

export 'src/context/room.dart';
export 'src/context/participant.dart';
export 'src/context/track.dart';
export 'src/context/room_context.dart';
export 'src/context/participant_context.dart';
export 'src/context/track_context.dart';
export 'src/ui/debug/track_stats_widget.dart';
export 'src/types/theme.dart';
export 'src/types/types.dart';
Expand All @@ -13,9 +13,9 @@ export 'src/ui/buttons/chat_toggle.dart';
export 'src/ui/buttons/join_button.dart';
export 'src/ui/buttons/screenshare_toggle.dart';
export 'src/ui/chat/chat_widget.dart';
export 'src/ui/room/room.dart';
export 'src/ui/room/toast.dart';
export 'src/ui/room/control_bar.dart';
export 'src/ui/builder/room.dart';
export 'src/ui/builder/toast.dart';
export 'src/ui/builder/control_bar.dart';
export 'src/ui/participant/participant_tile_widget.dart';
export 'src/ui/participant/participant_loop.dart';
export 'src/ui/participant/is_speaking_indicator.dart';
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import 'package:livekit_client/livekit_client.dart';
import 'package:provider/provider.dart';

import '../ui/debug/logger.dart';
import 'room.dart';
import 'room_context.dart';

class MediaDeviceContext extends ChangeNotifier {
/// Get the [MediaDeviceContext] from the [context].
Expand Down Expand Up @@ -106,8 +106,8 @@ class MediaDeviceContext extends ChangeNotifier {
deviceId: device.deviceId,
),
);
selectedVideoInputDeviceId = device.deviceId;
}
selectedVideoInputDeviceId = device.deviceId;
notifyListeners();
}

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'package:livekit_client/livekit_client.dart';
import 'package:provider/provider.dart';

import '../ui/debug/logger.dart';
import 'chat.dart';
import 'chat_context.dart';

class RoomContext extends ChangeNotifier with ChatContextMixin {
/// Get the [RoomContext] from the [context].
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import 'package:flutter/material.dart';
import 'package:livekit_client/livekit_client.dart';
import 'package:provider/provider.dart';

import '../../context/media_device.dart';
import '../../context/room.dart';
import '../../context/room_context.dart';
import '../buttons/audio_output_select_button.dart';
import '../buttons/camera_select_button.dart';
import '../buttons/chat_toggle.dart';
import '../buttons/disconnect_button.dart';
import '../buttons/microphone_select_button.dart';
import '../buttons/screenshare_toggle.dart';
import 'media_device.dart';

class ControlBar extends StatelessWidget {
const ControlBar({
Expand Down Expand Up @@ -42,9 +42,8 @@ class ControlBar extends StatelessWidget {
),
child: Consumer<RoomContext>(
builder: (context, roomCtx, child) {
return ChangeNotifierProvider(
create: (_) => MediaDeviceContext(roomCtx: roomCtx),
child: Wrap(
return MediaDevices(
builder: (context, mediaDeviceCtx) => Wrap(
alignment: WrapAlignment.center,
spacing: 6,
runSpacing: 6,
Expand Down
28 changes: 28 additions & 0 deletions lib/src/ui/builder/media_device.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import 'package:flutter/material.dart';

import 'package:provider/provider.dart';

import '../../context/media_device_context.dart';
import '../../context/room_context.dart';

typedef MediaDevicesBuilder = Widget Function(
BuildContext context, MediaDeviceContext mediaDeviceContext);

class MediaDevices extends StatelessWidget {
const MediaDevices({super.key, required this.builder});

final MediaDevicesBuilder builder;

@override
Widget build(BuildContext context) {
return Consumer<RoomContext>(
builder: (context, roomCtx, child) => ChangeNotifierProvider(
create: (_) => MediaDeviceContext(roomCtx: roomCtx),
child: Consumer<MediaDeviceContext>(
builder: (context, mediaDeviceCtx, child) =>
builder(context, mediaDeviceCtx),
),
),
);
}
}
2 changes: 1 addition & 1 deletion lib/src/ui/room/room.dart → lib/src/ui/builder/room.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'package:flutter/material.dart';

import 'package:provider/provider.dart';

import '../../context/room.dart';
import '../../context/room_context.dart';

typedef RoomContextBuilder = Widget Function(
BuildContext context, RoomContext roomCtx);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'package:flutter/material.dart' hide ConnectionState;
import 'package:livekit_client/livekit_client.dart';
import 'package:provider/provider.dart';

import '../../context/room.dart';
import '../../context/room_context.dart';

class ToastWidget extends StatefulWidget {
const ToastWidget({
Expand Down
4 changes: 2 additions & 2 deletions lib/src/ui/buttons/audio_output_select_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import 'package:livekit_client/livekit_client.dart';
import 'package:provider/provider.dart';
import 'package:responsive_builder/responsive_builder.dart';

import '../../context/media_device.dart';
import '../../context/room.dart';
import '../../context/media_device_context.dart';
import '../../context/room_context.dart';
import '../../types/theme.dart';

class AudioOutputSelectButton extends StatelessWidget {
Expand Down
4 changes: 2 additions & 2 deletions lib/src/ui/buttons/camera_select_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import 'package:livekit_client/livekit_client.dart';
import 'package:provider/provider.dart';
import 'package:responsive_builder/responsive_builder.dart';

import '../../context/media_device.dart';
import '../../context/room.dart';
import '../../context/media_device_context.dart';
import '../../context/room_context.dart';
import '../../types/theme.dart';

class CameraSelectButton extends StatelessWidget {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/ui/buttons/chat_toggle.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:livekit_client/livekit_client.dart';
import 'package:provider/provider.dart';
import 'package:responsive_builder/responsive_builder.dart';

import '../../context/room.dart';
import '../../context/room_context.dart';
import '../../types/theme.dart';

class ChatToggle extends StatelessWidget {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/ui/buttons/disconnect_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:livekit_client/livekit_client.dart';
import 'package:provider/provider.dart';
import 'package:responsive_builder/responsive_builder.dart';

import '../../context/room.dart';
import '../../context/room_context.dart';

class DisconnectButton extends StatelessWidget {
const DisconnectButton(
Expand Down
2 changes: 1 addition & 1 deletion lib/src/ui/buttons/join_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'package:flutter/material.dart';

import 'package:provider/provider.dart';

import '../../context/room.dart';
import '../../context/room_context.dart';
import '../../types/theme.dart';

class JoinButton extends StatelessWidget {
Expand Down
4 changes: 2 additions & 2 deletions lib/src/ui/buttons/microphone_select_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import 'package:livekit_client/livekit_client.dart';
import 'package:provider/provider.dart';
import 'package:responsive_builder/responsive_builder.dart';

import '../../context/media_device.dart';
import '../../context/room.dart';
import '../../context/media_device_context.dart';
import '../../context/room_context.dart';
import '../../types/theme.dart';

class MicrophoneSelectButton extends StatelessWidget {
Expand Down
4 changes: 2 additions & 2 deletions lib/src/ui/buttons/screenshare_toggle.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import 'package:livekit_client/livekit_client.dart';
import 'package:provider/provider.dart';
import 'package:responsive_builder/responsive_builder.dart';

import '../../context/media_device.dart';
import '../../context/room.dart';
import '../../context/media_device_context.dart';
import '../../context/room_context.dart';
import '../../types/theme.dart';

class ScreenShareToggle extends StatelessWidget {
Expand Down
4 changes: 2 additions & 2 deletions lib/src/ui/chat/chat_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import 'package:flutter/material.dart';
import 'package:chat_bubbles/chat_bubbles.dart';
import 'package:provider/provider.dart';

import '../../context/chat.dart';
import '../../context/room.dart';
import '../../context/chat_context.dart';
import '../../context/room_context.dart';
import '../../types/theme.dart';
import 'data_chip.dart';

Expand Down
4 changes: 2 additions & 2 deletions lib/src/ui/debug/track_stats_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import 'package:flutter/material.dart';

import 'package:provider/provider.dart';

import '../../context/room.dart';
import '../../context/track.dart';
import '../../context/room_context.dart';
import '../../context/track_context.dart';

class TrackStatsWidget extends StatelessWidget {
const TrackStatsWidget({Key? key}) : super(key: key);
Expand Down
2 changes: 1 addition & 1 deletion lib/src/ui/participant/connection_quality_indicator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
import 'package:livekit_client/livekit_client.dart';
import 'package:provider/provider.dart';

import '../../context/participant.dart';
import '../../context/participant_context.dart';
import '../debug/logger.dart';

class ConnectionQualityIndicator extends StatelessWidget {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/ui/participant/e2e_encryption_indicator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'package:flutter/material.dart';

import 'package:provider/provider.dart';

import '../../context/participant.dart';
import '../../context/participant_context.dart';
import '../debug/logger.dart';

class E2EEncryptionIndicator extends StatelessWidget {
Expand Down
4 changes: 2 additions & 2 deletions lib/src/ui/participant/focus_toggle.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import 'package:flutter/material.dart';

import 'package:provider/provider.dart';

import '../../context/room.dart';
import '../../context/track.dart';
import '../../context/room_context.dart';
import '../../context/track_context.dart';
import '../debug/logger.dart';

class FocusToggle extends StatelessWidget {
Expand Down
4 changes: 2 additions & 2 deletions lib/src/ui/participant/is_speaking_indicator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import 'package:flutter/material.dart';

import 'package:provider/provider.dart';

import '../../context/participant.dart';
import '../../context/track.dart';
import '../../context/participant_context.dart';
import '../../context/track_context.dart';
import '../../types/theme.dart';
import '../debug/logger.dart';

Expand Down
2 changes: 1 addition & 1 deletion lib/src/ui/participant/no_track_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:flutter/material.dart';

import 'package:provider/provider.dart';

import '../../context/track.dart';
import '../../context/track_context.dart';
import '../../types/theme.dart';
import '../debug/logger.dart';

Expand Down
6 changes: 3 additions & 3 deletions lib/src/ui/participant/participant_loop.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import 'package:flutter/material.dart';
import 'package:livekit_client/livekit_client.dart';
import 'package:provider/provider.dart';

import '../../context/participant.dart';
import '../../context/room.dart';
import '../../context/track.dart';
import '../../context/participant_context.dart';
import '../../context/room_context.dart';
import '../../context/track_context.dart';
import '../debug/logger.dart';
import '../layout/grid_layout.dart';
import '../layout/layouts.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/src/ui/participant/participant_muted_indicator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'package:flutter/material.dart';

import 'package:provider/provider.dart';

import '../../context/participant.dart';
import '../../context/participant_context.dart';
import '../debug/logger.dart';

class ParticipantMutedIndicator extends StatelessWidget {
Expand Down
4 changes: 2 additions & 2 deletions lib/src/ui/participant/participant_name.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import 'package:flutter/material.dart';

import 'package:provider/provider.dart';

import '../../context/participant.dart';
import '../../context/track.dart';
import '../../context/participant_context.dart';
import '../../context/track_context.dart';
import '../debug/logger.dart';

class ParticipantName extends StatelessWidget {
Expand Down
4 changes: 2 additions & 2 deletions lib/src/ui/participant/participant_status_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import 'package:flutter/material.dart';

import 'package:provider/provider.dart';

import '../../context/participant.dart';
import '../../context/track.dart';
import '../../context/participant_context.dart';
import '../../context/track_context.dart';
import '../debug/logger.dart';
import 'connection_quality_indicator.dart';
import 'e2e_encryption_indicator.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/src/ui/participant/participant_tile_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'package:flutter/material.dart';

import 'package:provider/provider.dart';

import '../../context/track.dart';
import '../../context/track_context.dart';
import '../debug/logger.dart';
import '../debug/track_stats_widget.dart';
import 'focus_toggle.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/src/ui/participant/video_track_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
import 'package:livekit_client/livekit_client.dart';
import 'package:provider/provider.dart';

import '../../context/track.dart';
import '../../context/track_context.dart';
import '../debug/logger.dart';
import 'no_track_widget.dart';

Expand Down
2 changes: 1 addition & 1 deletion lib/src/ui/prejoin/camera_preview.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'package:flutter/material.dart';
import 'package:livekit_client/livekit_client.dart';
import 'package:provider/provider.dart';

import '../../context/room.dart';
import '../../context/room_context.dart';
import '../../types/theme.dart';

class CameraPreview extends StatelessWidget {
Expand Down
Loading

0 comments on commit f2028f5

Please sign in to comment.