initParticipant method
Implementation
Future<void> initParticipant({required BuildContext buildContext}) async {
context = buildContext;
tabController = TabController(length: 2, vsync: this);
getMaxCallUsersCount = (await Mirrorfly.getMaxCallUsersCount()) ?? 8;
scrollController.addListener(_scrollListener);
tabController?.animation?.addListener(() {
LogMessage.d("DefaultTabController", "${tabController?.index}");
// Current animation value. It ranges from 0 to (tabsCount - 1)
final animationValue = tabController?.animation!.value;
LogMessage.d("animationValue", "$animationValue");
// Simple rounding gives us understanding of what tab is showing
final currentTabIndex = animationValue?.round();
LogMessage.d("currentTabIndex", "$currentTabIndex");
currentTab(currentTabIndex);
if (currentTabIndex == 0) {
getBackFromSearch();
}
});
if (groupId.isEmpty) {
if (await AppUtils.isNetConnected() || Constants.enableContactSync) {
isPageLoading(true);
fetchUsers(false);
} else {
toToast(Constants.noInternetConnection);
}
} else {
getGroupMembers();
}
}