-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into bloc-app-update
- Loading branch information
Showing
19 changed files
with
284 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
packages/hms_room_kit/lib/src/meeting/empty_room_screen.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
library; | ||
|
||
///Package imports | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_svg/flutter_svg.dart'; | ||
import 'package:hms_room_kit/hms_room_kit.dart'; | ||
|
||
///[EmptyRoomScreen] is a widget that is used to render the empty room screen | ||
///This screen is shown when there is only single publisher | ||
class EmptyRoomScreen extends StatelessWidget { | ||
@override | ||
Widget build(BuildContext context) { | ||
return Column( | ||
mainAxisAlignment: MainAxisAlignment.center, | ||
children: [ | ||
CircleAvatar( | ||
backgroundColor: HMSThemeColors.surfaceDefault, | ||
radius: 40, | ||
child: SvgPicture.asset( | ||
"packages/hms_room_kit/lib/src/assets/icons/add_peer.svg", | ||
height: 37, | ||
width: 37, | ||
colorFilter: ColorFilter.mode( | ||
HMSThemeColors.onSurfaceHighEmphasis, BlendMode.srcIn), | ||
), | ||
), | ||
const SizedBox( | ||
height: 24, | ||
), | ||
HMSTitleText( | ||
text: "You’re the first to join", | ||
textColor: HMSThemeColors.onSurfaceHighEmphasis, | ||
fontSize: 24, | ||
lineHeight: 32, | ||
), | ||
const SizedBox( | ||
height: 8, | ||
), | ||
HMSTitleText( | ||
text: "Sit back and relax till others join", | ||
textColor: HMSThemeColors.onSurfaceMediumEmphasis, | ||
fontWeight: FontWeight.w400, | ||
maxLines: 3, | ||
) | ||
], | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100 changes: 100 additions & 0 deletions
100
packages/hms_room_kit/lib/src/meeting/waiting_room_screen.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
library; | ||
|
||
///Package imports | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_svg/flutter_svg.dart'; | ||
import 'package:provider/provider.dart'; | ||
|
||
///Project imports | ||
import 'package:hms_room_kit/hms_room_kit.dart'; | ||
import 'package:hms_room_kit/src/meeting/meeting_store.dart'; | ||
|
||
///[WaitingRoomScreen] is a widget that is used to render the waiting room screen | ||
///This is rendered when the user is waiting for the host to join | ||
///or when the user has only screenshare option | ||
class WaitingRoomScreen extends StatelessWidget { | ||
///[showScreenshareOption] is a function that returns true if the user has only screenshare option | ||
bool showScreenshareOption(MeetingStore meetingStore) { | ||
return (!(meetingStore.localPeer?.role.publishSettings?.allowed | ||
.contains("video") ?? | ||
true) && | ||
(meetingStore.localPeer?.role.publishSettings?.allowed | ||
.contains("screen") ?? | ||
false) && | ||
!(meetingStore.localPeer?.role.publishSettings?.allowed | ||
.contains("audio") ?? | ||
true)); | ||
} | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
var meetingStore = context.watch<MeetingStore>(); | ||
|
||
return Column( | ||
mainAxisAlignment: MainAxisAlignment.center, | ||
children: showScreenshareOption(meetingStore) | ||
? [ | ||
CircleAvatar( | ||
backgroundColor: HMSThemeColors.surfaceDefault, | ||
radius: 40, | ||
child: SvgPicture.asset( | ||
"packages/hms_room_kit/lib/src/assets/icons/screen_share.svg", | ||
height: 37, | ||
width: 37, | ||
colorFilter: ColorFilter.mode( | ||
HMSThemeColors.onSurfaceHighEmphasis, BlendMode.srcIn), | ||
), | ||
), | ||
const SizedBox( | ||
height: 24, | ||
), | ||
HMSTitleText( | ||
text: "Ready to present", | ||
textColor: HMSThemeColors.onSurfaceHighEmphasis, | ||
fontSize: 24, | ||
lineHeight: 32, | ||
), | ||
const SizedBox( | ||
height: 8, | ||
), | ||
HMSTitleText( | ||
text: | ||
"Select the screenshare button \nfrom the menu to start presenting.", | ||
textColor: HMSThemeColors.onSurfaceMediumEmphasis, | ||
fontWeight: FontWeight.w400, | ||
maxLines: 3, | ||
) | ||
] | ||
: [ | ||
CircleAvatar( | ||
backgroundColor: HMSThemeColors.surfaceDefault, | ||
radius: 40, | ||
child: SvgPicture.asset( | ||
"packages/hms_room_kit/lib/src/assets/icons/add_peer.svg", | ||
height: 37, | ||
width: 37, | ||
colorFilter: ColorFilter.mode( | ||
HMSThemeColors.onSurfaceHighEmphasis, BlendMode.srcIn), | ||
), | ||
), | ||
const SizedBox( | ||
height: 24, | ||
), | ||
HMSTitleText( | ||
text: "Waiting for Host to join", | ||
textColor: HMSThemeColors.onSurfaceHighEmphasis, | ||
fontSize: 24, | ||
lineHeight: 32, | ||
), | ||
const SizedBox( | ||
height: 8, | ||
), | ||
HMSTitleText( | ||
text: "Sit back and relax", | ||
textColor: HMSThemeColors.onSurfaceMediumEmphasis, | ||
fontWeight: FontWeight.w400, | ||
) | ||
], | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.