Add null check to reports
This commit is contained in:
parent
aee9827740
commit
49cde7296e
|
|
@ -1229,9 +1229,13 @@ class ReportResult {
|
||||||
final rows = <DataRow>[];
|
final rows = <DataRow>[];
|
||||||
final store = StoreProvider.of<AppState>(context);
|
final store = StoreProvider.of<AppState>(context);
|
||||||
final state = store.state;
|
final state = store.state;
|
||||||
final reportSettings = state.userCompany.settings
|
final reportState = state.uiState.reportsUIState;
|
||||||
?.reportSettings[state.uiState.reportsUIState.report] ??
|
final settings = state.userCompany.settings;
|
||||||
ReportSettingsEntity();
|
final reportSettings = settings != null &&
|
||||||
|
settings.reportSettings.containsKey(reportState.report)
|
||||||
|
? settings.reportSettings[reportState.report]
|
||||||
|
: ReportSettingsEntity();
|
||||||
|
|
||||||
final Map<String, Map<String, double>> totals = {};
|
final Map<String, Map<String, double>> totals = {};
|
||||||
|
|
||||||
final allColumns = <String>[];
|
final allColumns = <String>[];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue