getList method
Get users
Implementation
Future<void> getList() async {
_loading = true;
notifyListeners();
try {
await Future.delayed(const Duration(seconds: 2));
_models = await service.getUserList(
userId: 1
);
} catch (e) {
_error = e.getMessage();
}
_loading = false;
notifyListeners();
}