Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flut 210 #1713

Merged
merged 54 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
a5d2581
Created extension for polls
Decoder07 Jan 15, 2024
8915a6b
Added poll callbacks
Decoder07 Jan 16, 2024
b15f88d
Added files for poll callbacks
Decoder07 Jan 16, 2024
98a285f
Updated release notes (#1694)
Decoder07 Jan 15, 2024
423cd1d
Updated links for sdk and prebuilt
Decoder07 Jan 16, 2024
b30751c
Updated links for sdk and prebuilt
Decoder07 Jan 16, 2024
1e77282
Fixed bugs
Decoder07 Jan 16, 2024
400bfa6
🤖 Automated Format and Fix
Decoder07 Jan 16, 2024
ec720fb
released sample app version 1.5.124 (424) 🍀
Decoder07 Jan 16, 2024
0a0cdf2
🤖 Automated Format and Fix
Decoder07 Jan 16, 2024
df91ed0
Updated changelog
Decoder07 Jan 16, 2024
507a973
Updated pubspec
Decoder07 Jan 16, 2024
def1667
🤖 Automated Format and Fix
Decoder07 Jan 16, 2024
28a74d2
Updated sdk version in room kit
Decoder07 Jan 16, 2024
58a3d8f
🤖 Automated Format and Fix
Decoder07 Jan 16, 2024
eb74e30
Updated changes
Decoder07 Jan 16, 2024
3e10424
updated changelog
Decoder07 Jan 16, 2024
a37fab9
Completed poll parsing
Decoder07 Jan 17, 2024
302f99f
Added iOS implementation
Decoder07 Jan 18, 2024
8f99b4d
merged develop
Decoder07 Jan 18, 2024
ea1578c
Added parsing in iOS
Decoder07 Jan 18, 2024
e5f5356
Added create poll ui
Decoder07 Jan 24, 2024
cf5b591
Added options ui
Decoder07 Jan 24, 2024
9833d39
Added launch poll flow
Decoder07 Jan 29, 2024
e604acb
Added launch poll flow
Decoder07 Jan 29, 2024
61cc6e1
Added option to view previous polls
Decoder07 Jan 29, 2024
df4a5d2
released sample app version 1.5.132 (432) 🍀
ygit Jan 30, 2024
13262b4
Added voting flow
Decoder07 Jan 31, 2024
ddb6adb
Refactored code
Decoder07 Jan 31, 2024
e5ca16d
Completed voting flow
Decoder07 Feb 1, 2024
fc7a1eb
Added polls voted flow
Decoder07 Feb 5, 2024
4552fea
released sample app version 1.5.133 (433) 🍀
ygit Feb 5, 2024
e4038bf
updated gems
ygit Feb 5, 2024
9c41de1
updated supported version in app framework info.plist
ygit Feb 5, 2024
4c85803
Added changes
Decoder07 Feb 5, 2024
44fc71e
Fixed poll results issue
Decoder07 Feb 5, 2024
bb3cdda
Updated changelog
Decoder07 Feb 5, 2024
0e66689
Added option to start quiz
Decoder07 Feb 6, 2024
ddc7043
Merged develop
Decoder07 Feb 13, 2024
47d1c74
resolved errors
Decoder07 Feb 13, 2024
002bed6
Added quiz option
Decoder07 Feb 15, 2024
1c4de66
Updated gemfile
Decoder07 Feb 15, 2024
1241e61
🤖 Automated Format and Fix
Decoder07 Feb 15, 2024
fdb9493
Updated sdk versions (#1714)
Decoder07 Feb 16, 2024
688bd0b
🤖 Automated Format and Fix
ygit Feb 16, 2024
20b7837
released sample app version 1.5.140 (440) 🍀
ygit Feb 16, 2024
bdfd54e
updated packages
ygit Feb 16, 2024
3835b64
🤖 Automated Format and Fix
ygit Feb 16, 2024
cedc899
Fixed bugs
Decoder07 Feb 16, 2024
7539380
🤖 Automated Format and Fix
Decoder07 Feb 16, 2024
7f16099
Added sorting for polls and quizzes
Decoder07 Feb 16, 2024
fa6802b
🤖 Automated Format and Fix
Decoder07 Feb 16, 2024
804ef7a
release sample app version 1.5.141 (441) 🍀
Decoder07 Feb 16, 2024
d6412b5
Added changelog
Decoder07 Feb 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions packages/hms_room_kit/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@
| hms_room_kit | [![Pub Version](https://img.shields.io/pub/v/hms_room_kit)](https://pub.dev/packages/hms_room_kit) |
| hmssdk_flutter | [![Pub Version](https://img.shields.io/pub/v/hmssdk_flutter)](https://pub.dev/packages/hmssdk_flutter) |

## 1.0.13 - 2024-02-16

| Package | Version |
| -------------- | ------------------------------------------------------------------------------------------------------ |
| hms_room_kit | 1.0.13 |
| hmssdk_flutter | 1.9.10 |

### 🚀 Added

- Introducing quizzes on prebuilt

Users can now create, manage, and stop quizzes directly from the prebuilt interface.

Updated `hmssdk_flutter` package version to 1.9.10

## 1.0.12 - 2024-02-12

| Package | Version |
Expand Down
39 changes: 19 additions & 20 deletions packages/hms_room_kit/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,10 @@ packages:
dependency: transitive
description:
name: flutter_foreground_task
sha256: e48d2d810a2d643362e64de41146ed8e95d4dd282bae6abbb32309d9f0bf5d67
sha256: "9bcfcb43bba4a5446a056e723d21118ff6e184926b5557365c32c13caca157c2"
url: "https://pub.dev"
source: hosted
version: "6.1.2"
version: "6.1.3"
flutter_linkify:
dependency: transitive
description:
Expand Down Expand Up @@ -214,15 +214,14 @@ packages:
path: ".."
relative: true
source: path
version: "1.0.12"
version: "1.0.13"
hmssdk_flutter:
dependency: transitive
description:
name: hmssdk_flutter
sha256: bad4ff87c677970f0c9acfcd4e84b60089461e1c1eef23e3a3ae6ab191484b95
url: "https://pub.dev"
source: hosted
version: "1.9.9"
path: "../../hmssdk_flutter"
relative: true
source: path
version: "1.9.10"
http:
dependency: transitive
description:
Expand Down Expand Up @@ -467,10 +466,10 @@ packages:
dependency: transitive
description:
name: share_plus
sha256: f74fc3f1cbd99f39760182e176802f693fa0ec9625c045561cfad54681ea93dd
sha256: "3ef39599b00059db0990ca2e30fca0a29d8b37aae924d60063f8e0184cf20900"
url: "https://pub.dev"
source: hosted
version: "7.2.1"
version: "7.2.2"
share_plus_platform_interface:
dependency: transitive
description:
Expand Down Expand Up @@ -624,10 +623,10 @@ packages:
dependency: transitive
description:
name: url_launcher_android
sha256: "507dc655b1d9cb5ebc756032eb785f114e415f91557b73bf60b7e201dfedeb2f"
sha256: d4ed0711849dd8e33eb2dd69c25db0d0d3fdc37e0a62e629fe32f57a22db2745
url: "https://pub.dev"
source: hosted
version: "6.2.2"
version: "6.3.0"
url_launcher_ios:
dependency: transitive
description:
Expand Down Expand Up @@ -656,10 +655,10 @@ packages:
dependency: transitive
description:
name: url_launcher_platform_interface
sha256: a932c3a8082e118f80a475ce692fde89dc20fddb24c57360b96bc56f7035de1f
sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029"
url: "https://pub.dev"
source: hosted
version: "2.3.1"
version: "2.3.2"
url_launcher_web:
dependency: transitive
description:
Expand Down Expand Up @@ -688,26 +687,26 @@ packages:
dependency: transitive
description:
name: vector_graphics
sha256: "18f6690295af52d081f6808f2f7c69f0eed6d7e23a71539d75f4aeb8f0062172"
sha256: "4ac59808bbfca6da38c99f415ff2d3a5d7ca0a6b4809c71d9cf30fba5daf9752"
url: "https://pub.dev"
source: hosted
version: "1.1.9+2"
version: "1.1.10+1"
vector_graphics_codec:
dependency: transitive
description:
name: vector_graphics_codec
sha256: "531d20465c10dfac7f5cd90b60bbe4dd9921f1ec4ca54c83ebb176dbacb7bb2d"
sha256: f3247e7ab0ec77dc759263e68394990edc608fb2b480b80db8aa86ed09279e33
url: "https://pub.dev"
source: hosted
version: "1.1.9+2"
version: "1.1.10+1"
vector_graphics_compiler:
dependency: transitive
description:
name: vector_graphics_compiler
sha256: "03012b0a33775c5530576b70240308080e1d5050f0faf000118c20e6463bc0ad"
sha256: "18489bdd8850de3dd7ca8a34e0c446f719ec63e2bab2e7a8cc66a9028dd76c5a"
url: "https://pub.dev"
source: hosted
version: "1.1.9+2"
version: "1.1.10+1"
vector_math:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion packages/hms_room_kit/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.0.12
version: 1.0.13

environment:
sdk: ">=2.19.6 <3.0.0"
Expand Down
10 changes: 10 additions & 0 deletions packages/hms_room_kit/lib/src/common/utility_functions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import 'package:shared_preferences/shared_preferences.dart';

///Project imports
import 'package:hms_room_kit/hms_room_kit.dart';
import 'package:tuple/tuple.dart';

///This class contains the utility functions used in the app
class Utilities {
Expand Down Expand Up @@ -121,6 +122,15 @@ class Utilities {
}
}

///This function returns the question type for poll/quiz
static List<Tuple2<String, HMSPollQuestionType>>
getQuestionTypeForPollQuiz() {
return const [
Tuple2("Single Choice", HMSPollQuestionType.singleChoice),
Tuple2("Multiple Choice", HMSPollQuestionType.multiChoice)
];
}

///This method returns the scale of the toast according to the index and the total number of toasts
static double getToastScale(int index, int toastsCount) {
if (toastsCount == 1) {
Expand Down
8 changes: 3 additions & 5 deletions packages/hms_room_kit/lib/src/hmssdk_interactor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -414,12 +414,10 @@ class HMSSDKInteractor {
forPeer: forPeer, hmsActionResultListener: hmsActionResultListener);
}

void quickStartPoll(
{required HMSPollBuilder pollBuilder,
HMSActionResultListener? hmsActionResultListener}) {
void quickStartPoll({required HMSPollBuilder pollBuilder}) {
HMSPollInteractivityCenter.quickStartPoll(
pollBuilder: pollBuilder,
hmsActionResultListener: hmsActionResultListener);
pollBuilder: pollBuilder,
);
}

Future<dynamic> addSingleChoicePollResponse(
Expand Down
2 changes: 1 addition & 1 deletion packages/hms_room_kit/lib/src/meeting/meeting_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import 'dart:math';
///Package imports
import 'package:flutter/material.dart';
import 'package:flutter_foreground_task/flutter_foreground_task.dart';
import 'package:hms_room_kit/src/widgets/toasts/toast_widget.dart';
import 'package:provider/provider.dart';
import 'package:tuple/tuple.dart';
import 'package:hmssdk_flutter/hmssdk_flutter.dart';

///Project imports
import 'package:hms_room_kit/src/widgets/toasts/toast_widget.dart';
import 'package:hms_room_kit/hms_room_kit.dart';
import 'package:hms_room_kit/src/meeting/meeting_grid_component.dart';
import 'package:hms_room_kit/src/meeting/meeting_navigation_visibility_controller.dart';
Expand Down
33 changes: 27 additions & 6 deletions packages/hms_room_kit/lib/src/meeting/meeting_store.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2236,10 +2236,9 @@ class MeetingStore extends ChangeNotifier

///Polls and Quiz
///Method to start poll
///Method to start poll and quiz
void quickStartPoll(HMSPollBuilder pollBuilder) {
_hmsSDKInteractor.quickStartPoll(
pollBuilder: pollBuilder, hmsActionResultListener: this);
_hmsSDKInteractor.quickStartPoll(pollBuilder: pollBuilder);
}

///Method to add Poll Response
Expand Down Expand Up @@ -2660,6 +2659,27 @@ class MeetingStore extends ChangeNotifier
notifyListeners();
}

///Insert poll question
void insertPollQuestion(HMSPollStore store) {
pollQuestions.add(store);
sortPollQuestions();
}

///Function to sort poll questions based on state and startedAt time
void sortPollQuestions() {
pollQuestions.sort((a, b) {
if (a.poll.state != b.poll.state) {
return a.poll.state == HMSPollState.started ? 1 : -1;
} else {
if (a.poll.startedAt != null && b.poll.startedAt != null) {
return a.poll.startedAt!.compareTo(b.poll.startedAt!);
}
}
return 1;
});
notifyListeners();
}

@override
void onPeerListUpdate(
{required List<HMSPeer> addedPeers,
Expand All @@ -2673,7 +2693,7 @@ class MeetingStore extends ChangeNotifier
@override
void onPollUpdate(
{required HMSPoll poll, required HMSPollUpdateType pollUpdateType}) {
log("onPollUpdate -> poll $poll updateType: $pollUpdateType startedAt: ${poll.startedAt}");
log("onPollUpdate -> poll $poll updateType: $pollUpdateType}");
switch (pollUpdateType) {
///If the poll is started we add the poll in questions list
case HMSPollUpdateType.started:
Expand All @@ -2691,7 +2711,7 @@ class MeetingStore extends ChangeNotifier
if (index == -1) {
HMSPollStore store = HMSPollStore(poll: poll);
if (HMSRoomLayout.peerType == PeerRoleType.conferencing) {
pollQuestions.add(store);
insertPollQuestion(store);
toasts.add(HMSToastModel(store,
hmsToastType: HMSToastsType.pollStartedToast));
notifyListeners();
Expand All @@ -2707,7 +2727,7 @@ class MeetingStore extends ChangeNotifier
if (poll.startedAt != null &&
(DateTime.now().difference(poll.startedAt!) >
const Duration(seconds: 20))) {
pollQuestions.add(store);
insertPollQuestion(store);
toasts.add(HMSToastModel(store,
hmsToastType: HMSToastsType.pollStartedToast));
} else {
Expand All @@ -2734,6 +2754,7 @@ class MeetingStore extends ChangeNotifier
.indexWhere((element) => element.poll.pollId == poll.pollId);
if (index != -1) {
pollQuestions[index].updateState(poll);
sortPollQuestions();
}
notifyListeners();
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,29 +51,30 @@ class _AppUtilitiesBottomSheetState extends State<AppUtilitiesBottomSheet> {
bottom: 24),
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
///This renders the title and close button
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
HMSTitleText(
text: "Options",
textColor: HMSThemeColors.onSurfaceHighEmphasis,
letterSpacing: 0.15,
)
],
),
const Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
HMSCrossButton(),
],
)
],
),
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
HMSTitleText(
text: "Options",
textColor: HMSThemeColors.onSurfaceHighEmphasis,
letterSpacing: 0.15,
)
],
),
const Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
HMSCrossButton(),
],
)
],
),
]),
Padding(
padding: const EdgeInsets.only(top: 16, bottom: 16),
child: Divider(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,24 +45,28 @@ class _HLSMoreOptionsBottomSheetBottomSheetState
const EdgeInsets.only(top: 16.0, left: 20, right: 20, bottom: 24),
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
HMSTitleText(
text: "Options",
textColor: HMSThemeColors.onSurfaceHighEmphasis,
letterSpacing: 0.15,
Row(
children: [
HMSTitleText(
text: "Options",
textColor: HMSThemeColors.onSurfaceHighEmphasis,
letterSpacing: 0.15,
)
],
),
const Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [HMSCrossButton()],
)
],
),
const Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [HMSCrossButton()],
)
],
),
Padding(
Expand Down
Loading
Loading