flutter_smart_ptt 1.0.0
flutter_smart_ptt: ^1.0.0 copied to clipboard
smart-ptt
A intercom library that includes functions such as logging in, logging out, entering groups, exiting groups, making temporary calls, monitoring groups, canceling monitoring groups, sending and receiving messages, etc
Create object #
final _flutterSmartPttPlugin = FlutterSmartPtt();
Monitor data updates for intercom #
PocChangeNotifier pocChangeNotifier = _flutterSmartPttPlugin.getPocChangeNotifier(); pocChangeNotifier.addListener(() { ... pocChangeNotifier.xxx ... });
Monitor data updates for settings #
SettingChangeNotifier settingChangeNotifier = _flutterSmartPttPlugin.getSettingChangeNotifier(); settingChangeNotifier.addListener(() { ... settingChangeNotifier.xxx ... });
Set server address #
_flutterSmartPttPlugin.setUrl(url);
Login #
_flutterSmartPttPlugin.login(account, password);
Logout #
_flutterSmartPttPlugin.logout();
Start speaking #
_flutterSmartPttPlugin.startPTT();
End speaking #
_flutterSmartPttPlugin.endPTT();
Enter a group based on the group ID #
_flutterSmartPttPlugin.enterGroup(groupId);
Enter the previous group #
_flutterSmartPttPlugin.enterPreGroup();
Enter the next group #
_flutterSmartPttPlugin.enterNextGroup();
Exit the current group #
_flutterSmartPttPlugin.leaveGroup();
Monitor a group based on its ID #
_flutterSmartPttPlugin.addMonitorGroup(groupId);
###Cancel monitor a group based on its ID _flutterSmartPttPlugin.removeMonitorGroup(groupId);
###Send SOS alerts to the current group _flutterSmartPttPlugin.sos();
###Temporary call to one or more users _flutterSmartPttPlugin.inviteTmpGroup(userIdList);
###Pull one or more users into the current group _flutterSmartPttPlugin.pullUsersToGroup(userIdList);
###Remove one or more users from the current group _flutterSmartPttPlugin.disJoinUser(userIdList);
###Remove one or more users from the current group _flutterSmartPttPlugin.pullUsersToGroup(userIdList);
###Make one or more users unable to log in _flutterSmartPttPlugin.forceUserExit(userIdList);
###Send a message to a group based on the group ID _flutterSmartPttPlugin.sendGroupMsg(...);
###Send a message to a user based on their ID _flutterSmartPttPlugin.sendUserMsg(...);
###Modify Setting _flutterSmartPttPlugin.enablePTT(true); _flutterSmartPttPlugin.enablePTT(false);
_flutterSmartPttPlugin.enable8KCoding(false); _flutterSmartPttPlugin.enable8KCoding(true);
_flutterSmartPttPlugin.enableToast(true); _flutterSmartPttPlugin.enableToast(false);
_flutterSmartPttPlugin.enableVoiceBroadCast(true); _flutterSmartPttPlugin.enableVoiceBroadCast(false);
_flutterSmartPttPlugin.enableBeep(true); _flutterSmartPttPlugin.enableBeep(false);
_flutterSmartPttPlugin.enableLog(true); _flutterSmartPttPlugin.enableLog(false);
###Monitoring method _flutterSmartPttPlugin.smartPttMethodCall(handleMethodCall);