nextCatalogOrder property
Get the newest available order for a new catalog.
Implementation
int get nextCatalogOrder {
MokuroCatalog? highestOrderCatalog =
_database.mokuroCatalogs.where().sortByOrderDesc().findFirstSync();
late int order;
if (highestOrderCatalog != null) {
order = highestOrderCatalog.order + 1;
} else {
order = 0;
}
return order;
}