mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2024-11-13 02:14:31 +01:00
a54ca799b9
* update rules of analysis_options.yaml. and solved all problems * refactor: fix remaining problems --------- Co-authored-by: Ushie <ushiekane@gmail.com>
24 lines
1 KiB
Dart
24 lines
1 KiB
Dart
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<ManagerAPI>();
|
|
List<dynamic> patcherContributors = [];
|
|
List<dynamic> patchesContributors = [];
|
|
List<dynamic> integrationsContributors = [];
|
|
List<dynamic> cliContributors = [];
|
|
List<dynamic> managerContributors = [];
|
|
|
|
Future<void> getContributors() async {
|
|
final Map<String, List<dynamic>> contributors =
|
|
await _managerAPI.getContributors();
|
|
patcherContributors = contributors[_managerAPI.defaultPatcherRepo] ?? [];
|
|
patchesContributors = contributors[_managerAPI.getPatchesRepo()] ?? [];
|
|
integrationsContributors =
|
|
contributors[_managerAPI.getIntegrationsRepo()] ?? [];
|
|
cliContributors = contributors[_managerAPI.defaultCliRepo] ?? [];
|
|
managerContributors = contributors[_managerAPI.defaultManagerRepo] ?? [];
|
|
notifyListeners();
|
|
}
|
|
}
|