-
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 pull request #1613 from vinayakbot/main
Created a example app for hms_room_kit package
- Loading branch information
Showing
5 changed files
with
360 additions
and
62 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,27 @@ | ||
|
||
# HMSROOMKIT Example App 🚀 | ||
|
||
|
||
This contains a sample application built using `hms_room_kit` | ||
Steps to get on local machine= | ||
1. Clone the hms_flutter_sdk | ||
2. Cd inside the hms_room_kit package. | ||
3. Cd inside the example directory. | ||
4. Run the main file. | ||
|
||
Clone the Example app provided in the repo here. | ||
|
||
The "example" folder contains code relevant to the Example app. | ||
|
||
The Example application contains the implementation of hms_room_kit. | ||
|
||
|
||
|
||
For more clear understanding refer these- | ||
https://www.100ms.live/docs/flutter/v2/quickstart/prebuilt | ||
|
||
|
||
To Change the Join With Mute or UnMute or other settings refer; | ||
"packages\hms_room_kit\lib\src\service\app_debug_config.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
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
39 changes: 39 additions & 0 deletions
39
packages/hms_room_kit/example/lib/presentation/features/dashboard/dashboard_main_view.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,39 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:hms_room_kit/hms_room_kit.dart'; | ||
|
||
class DashboardMainView extends StatefulWidget { | ||
final String roomCode; | ||
final String? userName; | ||
const DashboardMainView({super.key, required this.roomCode, this.userName}); | ||
|
||
@override | ||
State<DashboardMainView> createState() => _DashboardMainViewState(); | ||
} | ||
|
||
class _DashboardMainViewState extends State<DashboardMainView> { | ||
late String userName; | ||
late HMSPrebuiltOptions _options; | ||
|
||
@override | ||
void initState() { | ||
userName = widget.userName ?? ''; | ||
|
||
_options = HMSPrebuiltOptions( | ||
////for prefill the name of the user in previewBuilt | ||
userName: userName, | ||
); | ||
// TODO: implement initState | ||
super.initState(); | ||
} | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return HMSPrebuilt( | ||
options: _options, | ||
roomCode: widget.roomCode, | ||
onLeave: () { | ||
/////onLeave do cleanup or any other task | ||
}, | ||
); | ||
} | ||
} |
Oops, something went wrong.