fetchList method
Future<void> fetchList ()
Fetches plugins from server and stores them in Hive pluginBox
.
params: None
returns:
Future<void>
: it returns Future of void
Implementation
Future<void> fetchList() async {
late final GraphQLClient client = graphqlConfig.clientToQuery();
final QueryResult result = await client.query(
QueryOptions(
document: gql(queries.getPluginsList()),
),
);
box = Hive.box('pluginBox');
box.put('plugins', result.data!["getPlugins"]);
}