]> git.proxmox.com Git - flutter/pve_flutter_frontend.git/commitdiff
PveResourceBloc: remove annotation for apiclient and add some docs
authorTim Marx <t.marx@proxmox.com>
Thu, 2 Jul 2020 09:30:52 +0000 (11:30 +0200)
committerTim Marx <t.marx@proxmox.com>
Thu, 2 Jul 2020 09:30:52 +0000 (11:30 +0200)
Signed-off-by: Tim Marx <t.marx@proxmox.com>
lib/bloc/pve_resource_bloc.dart

index fb4aa8cbffc8972d236e6bafc4b11a0cf4486286..5c32859b537c49d26b92b2dabb30e178612d250d 100644 (file)
@@ -7,11 +7,14 @@ import 'package:pve_flutter_frontend/bloc/proxmox_base_bloc.dart';
 import 'package:proxmox_dart_api_client/proxmox_dart_api_client.dart';
 import 'package:pve_flutter_frontend/states/pve_resource_state.dart';
 
+/// PveResourceBloc will per default fetch all cluster resources (periodically),
+/// if no ProxmoxApiClient is provided it won't do anything until one is added
+/// and a view subscribes to it.
 class PveResourceBloc
     extends ProxmoxBaseBloc<PveResourceEvents, PveResourceState> {
   ProxmoxApiClient apiClient;
 
-  PveResourceBloc({@required this.apiClient, @required this.init});
+  PveResourceBloc({this.apiClient, @required this.init});
 
   PveResourceState init;