app_management library
Application state management and lifecycle.
Provides state management classes including DesignState, ActionState, and ServerState for managing the application's data and UI state.
Classes
- ActionState
- State management for action mode and display settings
- AppPreferences
- Stores all app-wide preferences (assembly handle colors, update preferences, etc.) Singleton to ensure consistent caching across the app.
- AssemblyHandleColors
- Default assembly handle colors
- DesignSaveState
- DesignState
- State management for the design of the current megastructure Go to the individual mixin files for the bulk of the code
- GroupConfiguration
- A complete grouping scheme — like a tab of independent group assignments. Each configuration maps every slat to at most one group.
- HandleLinkManager
- Manages handle linking constraints for assembly handles.
- HoverPreview
- ParsedDesignResult
- Contains all data extracted from a design file by parseDesignInIsolate.
- ReleaseInfo
- Information about a GitHub release
- ServerState
- State management for communicating with python server
- SlatGroup
- A named set of slats with a display color, belonging to a single GroupConfiguration.
- SlatUndoStack
- UpdateService
- Service for checking app updates
- UpdateState
- State management for app updates
- VersionInfo
Enums
- SlatColorMode
- UpdateStatus
- Status of the update check
Mixins
- DesignStateCargoMixin
- Mixin containing cargo type management and cargo attachment operations for DesignState
- DesignStateContract
- Contract defining all shared members between DesignState mixins. This enables IDE navigation (Find Usages) to work across mixins by providing a single source of truth for all shared method signatures.
- DesignStateCoreMixin
- Mixin containing core utility operations for DesignState
- DesignStateFileIOMixin
- Mixin containing file import/export and undo/redo operations for DesignState
- DesignStateFluorophoreMixin
- Mixin containing fluorophore library CRUD and per-handle fluorophore assignment for DesignState.
- DesignStateGroupingMixin
- State management mixin for the slat grouping system.
- DesignStateHandleLinkMixin
- Mixin providing HandleLinkManager access in DesignState
- DesignStateHandleMixin
- Mixin containing handle assignment and assembly handle operations for DesignState
- DesignStateLayerMixin
- Mixin containing layer management operations for DesignState
- DesignStatePhantomMixin
- Mixin containing phantom slat operations for DesignState
- DesignStatePlateMixin
- Mixin containing plate import and handle assignment operations for DesignState
- DesignStateSeedMixin
- Mixin containing seed attachment and removal operations for DesignState
- DesignStateSlatColorMixin
- Mixin containing slat color management operations for DesignState
- DesignStateSlatMixin
- Mixin containing slat CRUD operations for DesignState
Constants
- cargoLayerPrefix → const String
- categoryAssembly → const String
- categoryAssemblyAntihandle → const String
- categoryAssemblyHandle → const String
- categoryCargo → const String
- categorySeed → const String
- echoConsolidatedTitlePrefix → const String
- echoConsolidatedTitleSuffix → const String
- echoManualHandlesMarker → const String
- echoPlateConsolidatedSheetName → const String
- fluorophoreAssignmentsSheetName → const String
- handleHighlightHex → const String
- handleInterfacePrefix → const String
- inputPlateSheetName → const String
- inputPlateTitlePrefix → const String
- inputPlateTitleSuffix → const String
- labMetadataSheetName → const String
- metaCellFileFormat → const String
- metaCellGridMode → const String
- metaCellLayerInterface → const String
- metaCellMaxX → const String
- metaCellMaxY → const String
- metaCellMinX → const String
- metaCellMinY → const String
- metadataSheetName → const String
- metaLayerStartRow → const int
- metaSectionCargoInfo → const String
- metaSectionFluorophoreInfo → const String
- metaSectionGroupColorInfo → const String
- metaSectionLayerInfo → const String
- metaSectionSlatColorInfo → const String
- seedLayerPrefix → const String
- slatHandleLinksSheetName → const String
- slatLayerPrefix → const String
- slatTypesSheetName → const String
Properties
- lastOpenDirectory ↔ String?
-
The last directory used for file operations, or null if none set.
getter/setter pair
Functions
-
buildDesignWorkbook(
Map< String, Slat> slats, Map<String, Map< layerMap, Map<String, dynamic> >String, Cargo> cargoPalette, Map<String, Map< occupiedCargoPoints, Map<Offset, String> >(String, String, Offset), Seed> seedRoster, HandleLinkManager linkManager, double gridSize, String gridMode, String suggestedDesignName, {PlateLayoutState? echoPlateLayoutState, PlateLibrary? plateLibrary, Map<String, GroupConfiguration> ? groupConfigurations, Map<String, Fluorophore> ? fluorophorePalette}) → Excel - Builds an in-memory .xlsx workbook for the full design state.
-
cargoSheetName(
int layerOrder, String side, String helix) → String -
dartToPythonSlatNameConvert(
String name, Map< String, Map< layerMap) → StringString, dynamic> > -
encodePhantomCellValue(
int phantomNumericID, int parentNumericID, int position) → String -
ensureExtension(
String filePath, String ext) → String -
Ensures
filePathends with .ext, appending it if missing. Case-insensitive to match Windows filesystem behavior. -
exportDesign(
Map< String, Slat> slats, Map<String, Map< layerMap, Map<String, dynamic> >String, Cargo> cargoPalette, Map<String, Map< occupiedCargoPoints, Map<Offset, String> >(String, String, Offset), Seed> seedRoster, HandleLinkManager linkManager, double gridSize, String gridMode, String suggestedDesignName, {PlateLayoutState? echoPlateLayoutState, PlateLibrary? plateLibrary, Map<String, GroupConfiguration> ? groupConfigurations, Map<String, Fluorophore> ? fluorophorePalette}) → Future<void> - Exports the full design state to a .xlsx workbook and prompts the user to save.
-
exportEvolutionParameters(
Map< String, String> parameters) → Future<void> -
Exports evolution
parametersto a .toml file via a save dialog. -
extractAssemblyHandlesFromExcel(
Excel excelFile, List< List< slatArray, Map<List< >int> >String, Slat> slats, Map<String, Map< layerMap, double minX, double minY, bool rowColFlipped) → boolString, dynamic> > -
Reads assembly handles from
excelFileand assigns them as placeholders onslats. -
extractHandleLinksFromExcel(
Excel excelFile, Map< String, Slat> slats, Map<String, Map< layerMap, HandleLinkManager linkManager) → String?String, dynamic> > -
Reads the handle link sheet from
excelFileand populateslinkManager. -
extractSheetRows(
Sheet sheet) → List< List> -
Extracts all rows from an Excel
sheet, converting each cell to a native Dart type. -
firstFreeKey(
Map< int, String> map, {int start = 1}) → int - Finds the first free integer key in a map
-
generateLayerString(
Map< String, Map< layerMap) → StringString, dynamic> > - Builds a compact string describing helix interface orientations across layers.
-
handleInterfaceSheetName(
int layerOrder) → String -
importAssemblyHandlesFromFileIntoSlatArray(
Map< String, Slat> slats, Map<String, Map< layerMap, double gridSize) → Future<String, dynamic> >bool> - Prompts the user for an Excel file, clears existing assembly handles, and imports new ones.
-
importDesign(
{String? inputFileName, Uint8List? inputFileBytes}) → Future< (ParsedDesignResult, String)> - Prompts the user to select a .xlsx design file (or accepts pre-loaded bytes) and parses it in an isolate.
-
importPlatesFromFile(
PlateLibrary plateLibrary) → Future< void> -
Prompts the user to select one or more .xlsx plate files and loads them into
plateLibrary. -
main(
) → void -
nextCapitalLetter(
String current) → String - Useful function to generate the next capital letter in the alphabet for slat identifier keys
-
parseDesignInIsolate(
Uint8List fileBytes) → Future< ParsedDesignResult> -
Parses raw Excel
fileBytesinto a complete ParsedDesignResult. -
positionalToSide(
String positional) → String -
pythonToDartSlatNameConvert(
String name, Map< String, Map< layerMap) → StringString, dynamic> > -
readExcelDouble(
Sheet workSheet, String cell) → double -
Reads a double from
cell, coercingIntCellValueto double. Returns 0.0 on type mismatch. -
readExcelInt(
Sheet workSheet, String cell) → int -
Reads an integer from
cell(e.g. 'B4'), returning 0 if the cell is not anIntCellValue. -
readExcelString(
Sheet workSheet, String cell) → String -
Reads a string from
cell, returning '' if the cell is not aTextCellValue. -
seedSheetName(
int layerOrder, String side, String helix) → String -
selectSaveLocation(
String defaultFileName) → Future< String?> - Shows a save dialog for an .xlsx file, returning the chosen path or null if cancelled.
-
setCellValue(
Sheet sheet, int col, int row, dynamic val, {CellStyle? style}) → void -
Writes a dynamic value to an Excel cell, choosing the appropriate
CellValuesubtype. -
sideToHelixKey(
String side) → String -
sideToPositionalName(
String side) → String -
slatLayerSheetName(
int layerOrder) → String -
writeHandleLinksToExcel(
Excel excel, Map< String, Slat> slats, HandleLinkManager linkManager, Map<String, Map< layerMap) → voidString, dynamic> > -
Writes handle link data from
linkManagerto a new sheet inexcel.