writeToDashboardConfigDB method
Implementation
FutureOr<void> writeToDashboardConfigDB(
DashboardConfigWrapper dashboardConfigWrapper,
Isar isar,
) async {
final dashboardConfig = DashboardConfigSchema()
..enableDashboard = dashboardConfigWrapper.enableDashboard
..charts = dashboardConfigWrapper.charts?.map((chart) {
final dssChart = DashboardChartConfigSchema()
..name = chart.name
..active = chart.active
..chartType = chart.chartType
..vizType = chart.vizType;
return dssChart;
}).toList();
isar.writeTxnSync(() {
isar.dashboardConfigSchemas.putSync(dashboardConfig);
});
}