Published 2025-07-23
TODO: Put a short description of the package here that helps potential users know whether this package might be useful for them.
Calculate (possible) multiple scenarios of print productions for an given item.
TODO: List prerequisites and provide or point to information on how to start using the package.
TODO: Include short and useful examples for package users. Add longer examples
to /example folder.
const like = 'sample';
Provide a json like string and calculate different scenarios witch are applicable for the provided options in the string. The base data is provided via the database, but can be overwritten for this case with a spreadsheet or provided solely by a spreadsheet.
If the required data is not provided within the spreadsheet, it wil be looked up in the database
final String inputOrderContext =
'{itemSize: 320x430,materialName:HVO,materialWeight:170,itemNumOfPages:2,itemNumOfItemsInSet:2,itemSides:DSOI}';
final Map<String, dynamic> inputOrderMap = JsonStringConverter(
rawJsonString: inputOrderContext,
).jsonString;
ModelOrder object from the JSON:final ModelOrder inputOrderModel = ModelerOrder(
orderMap: inputOrderMap,
).modelOrder;
ModelContext objectfinal ModelContext orderContext = ModelerContextOrder(
modelInputOrder: inputOrderModel,
spreadsheetBase: baseSpreadsheet,
).modelOrderContext;
--- The ModelContext creates the models needed to calculate the different scenarios:
--- ModelItem, witch contains the item related data.
--- List<ModelMaterial>, witch contains the applicable materials.
--- ModelJT - modelJtMaterialDefaultSizes, witch contains the many to many lookups for the material and default sizes.
--- ModelJT - modelJtMaterialPrinters, witch contains the many to many lookups for the material and printers.
--- List<ModelPrinter>, witch contains the applicable printers.
--- List<ModelDefaultSheetSize, witch contains the applicable default sheet sizes.
ModelCalculations objectModelOutputSpreadheet objectA calculation module for print productions.
