Utilities class
This class contains the utility functions used in the app
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- regexEmoji ↔ RegExp
-
getter/setter pair
-
timedMetadataAlignment
↔ List<
Alignment> -
List of alignments for timed metadata toasts
getter/setter pair
Static Methods
-
checkPermissions(
) → Future< bool> - This method checks for the permissions for the camera,microphone and bluetooth Based on this we route the screens.
-
fetchMeetingLinkFromFirebase(
String url) → String -
formatNumber(
int number) → String - This function formats the number of peers If the number of peers is greater than 1 million, we render the number in millions If the number of peers is greater than 1 thousand, we render the number in thousands else we render the number as it is
-
getAudioDeviceIconName(
HMSAudioDevice? hmsAudioDevice) → String - This method is used to get names for the audio devices It is used to set the icon based on the audio device
-
getAudioDeviceName(
HMSAudioDevice? hmsAudioDevice) → String - This method is used to get names for the audio devices
-
getAvatarTitle(
String name) → String - This function is used to get the avatar title
-
getBackgroundColour(
String name) → Color - This function is used to get the avatar background colour
-
getBoolData(
{required String key}) → Future< bool?> -
getCameraPermissions(
) → Future< bool> - This method is used to get camera permissions
-
getHLSPlayerDefaultRatio(
Size size) → double - This function is used to get HLS Player's Default Aspect Ratio for the screen
-
getHLSRatio(
Size size, BuildContext context) → double - This function is used to get HLS Player's Aspect Ratio for the screen
-
getIntData(
{required String key}) → Future< int> -
getPermissions(
) → Future< bool> - This function gets permissions for the camera,microphone and bluetooth headphones
-
getQuestionType(
HMSPollQuestionType questionType) → String -
getQuestionTypeForPollQuiz(
) → List< Tuple2< String, HMSPollQuestionType> > - This function returns the question type for poll/quiz
-
getRatio(
Size size, BuildContext context) → double - This function is used to get Aspect Ratio of the screen
-
getStringData(
{required String key}) → Future< String> -
getTimedMetadataEmojiFromId(
String emojiId) → String -
getToastColor(
int index, int toastsCount) → Color - This method returns the toast color based on the index and the number of toasts
-
getToastScale(
int index, int toastsCount) → double - This method returns the scale of the toast according to the index and the total number of toasts
-
getTrackSetting(
{required bool isAudioMixerDisabled, required bool joinWithMutedVideo, required bool joinWithMutedAudio, required bool isSoftwareDecoderDisabled, required bool isNoiseCancellationEnabled, HMSAudioMode? audioMode}) → HMSTrackSetting -
saveBoolData(
{required String key, required bool value}) → Future< bool> -
saveIntData(
{required String key, required int value}) → void -
saveStringData(
{required String key, required String value}) → void -
setRTMPUrl(
String roomUrl) → void - This function is used to get the RTMP URL from the room link
-
showNotification(
String message, String type) → void -
showTimedMetadata(
String message, {int time = 1, Alignment align = const Alignment(0, 0.8)}) → void -
showToast(
String message, {int time = 1}) → void