import 'package:revanced_manager/app/app.locator.dart'; import 'package:revanced_manager/services/manager_api.dart'; import 'package:stacked/stacked.dart'; class ContributorsViewModel extends BaseViewModel { final ManagerAPI _managerAPI = locator(); List patcherContributors = []; List patchesContributors = []; List integrationsContributors = []; List cliContributors = []; List managerContributors = []; Future getContributors() async { final Map> contributors = await _managerAPI.getContributors(); patcherContributors = contributors[_managerAPI.defaultPatcherRepo] ?? []; patchesContributors = contributors[_managerAPI.getPatchesRepo().toLowerCase()] ?? []; integrationsContributors = contributors[_managerAPI.getIntegrationsRepo().toLowerCase()] ?? []; cliContributors = contributors[_managerAPI.defaultCliRepo] ?? []; managerContributors = contributors[_managerAPI.defaultManagerRepo] ?? []; notifyListeners(); } }