fetchList method
Future<void> fetchList ()
<p>Fetches plugins from server and stores them in Hive <code>pluginBox</code>.</p> <p><strong>params</strong>: None</p> <p><strong>returns</strong>:</p> <ul> <li><code>Future<void></code>: it returns Future of void</li> </ul>
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"]);
\}