You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the solution you'd like
Plugin are features which can toggled to enable or disable by the talawa-admin application with proper authorization
This project has two parts:
The design and development of the plugin architecture
Create TalwaPluginProvider widget in flutter which can control visibility of the UI according to the visibility property set by the admin. It can look like this
classTalawaPluginProviderextendsStatelessWidget {
constTalawaPluginProvider(
{Key? key,
@requiredthis.child,
requiredthis.visible,
requiredthis.pluginName})
:super(key: key);
///child contains the widget for the plugin UI.finalWidget? child;
///visible is the property that decides visibility of the UI.finalbool visible;
///name of plugin preferred with underscores(_) insted of spacesfinalString pluginName;
///return `bool` decides the final visibility of the verifying from database and current OrgIdboolcheckFromPluginList() {
finalUserConfig _userConfig =locator<UserConfig>();
finalBox box;
bool res =false;
box =Hive.box('pluginBox');
final pluginList = box.get('plugins');
///mapping over the list from the server
pluginList
.map((plugin) => {
if (plugin["pluginName"] == pluginName)
{
if (plugin["pluginInstallStatus"] asbool)
{
res = plugin["pluginInstallStatus"] asbool||
plugin["installedOrgs"]
.contains(_userConfig.currentOrg.id) asbool
}
}
})
.toList();
return res;
}
///build the Plugin combining local `visibility` property and `serverVisible` property@overrideWidgetbuild(BuildContext context) {
var serverVisible =false;
serverVisible =checkFromPluginList();
returnVisibility(visible: serverVisible || visible, child: child!);
}
fetch_plugin_list function which will load the new list of plugin after the app is restarted
Store the plugin data is Hive Box
Add the query for 'fetchPlugins' . It can look like this:
///`getPluginList` queries all properties of pluginList from the serverStringgetPluginsList() {
return'''query { getPlugins { _id pluginName pluginCreatedBy pluginDesc pluginInstallStatus installedOrgs }} ''';
Describe alternatives you've considered
No. but alternatives can be suggested by the mentors
Approach to be followed (optional)
Above tasks will be carried out one by one.
Additional context
Not required.
The text was updated successfully, but these errors were encountered:
Congratulations on making your first Issue! 🎊 If you haven't already, check out our Contributing Guidelines and Issue Reporting Guidelines to ensure that you are following our guidelines for contributing and making issues.
This issue is associated with Google Summer of Code 2022 Project link
Is your feature request related to a problem? Please describe.
Problem statement taken from Project Ideas Page :
Latent features in the mobile app should be enabled by installing plugins via the Admin web portal. The API would need to detect the existence of a plugin, and automatically query the plugin for authorization to do some action. When authorized, the mobile app will display new capabilities.
Describe the solution you'd like
Plugin are features which can toggled to enable or disable by the talawa-admin application with proper authorization
This project has two parts:
The design and development of the plugin architecture
Create
TalwaPluginProvider
widget in flutter which can control visibility of the UI according to the visibility property set by the admin. It can look like thisfetch_plugin_list
function which will load the new list of plugin after the app is restartedDescribe alternatives you've considered
No. but alternatives can be suggested by the mentors
Approach to be followed (optional)
Above tasks will be carried out one by one.
Additional context
Not required.
The text was updated successfully, but these errors were encountered: