DVModule class
A mounted Dartvel module.
A module is a full Dartvel application boundary configured under
dartvel.module / dartvel.modules in pubspec.yaml. The parent
application reaches it through the generated DV.Modules.<id> accessor.
Module code must not hard-code its mount point: mountPath is assigned by the parent at registration, so the same module can be mounted anywhere.
- Available extensions
Constructors
Properties
- apiBase → String?
-
Where this module's backend functions answer, when they are not the
parent's.
no setter
-
assets
→ Map<
String, String> -
The module's own asset paths, each mapped to the path that finds it
once the module is mounted.
final
-
config
→ Map<
String, Object?> -
Configuration the parent passed at mount time.
final
- database → DVDatabaseAdapter
-
The database this module's models read and write.
no setter
- dataMode → DVModuleDataMode
-
Where this module's data lives, as the parent declared it.
no setter
- declaredShell → DVModuleShellBuilder?
-
Available on DVModule, provided by the DVModuleShelling extension
The chrome this module declared, or null when it declared none.no setter - declaredTheme → ThemeData?
-
Available on DVModule, provided by the DVModuleTheming extension
The theme this module declared, or null when it declared none.no setter -
exportedGlobals
→ List<
String> -
The globals this module shares with whatever mounted it.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
The module identifier, matching the generated
DV.Modules.<id>.final -
inheritedGlobals
→ List<
String> -
The application globals this module may read.
no setter
-
lifecycle
→ DVLifecycleSignal<
DVModuleLifecycle> -
DV.Modules.<id>.lifecycle— observed, never assigned by app code.no setter - mountPath → String
-
Where the parent mounted this module, e.g.
/store.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shellMode → DVModuleShellMode
-
How this module's chrome combines with the application's.
no setter
- themeMode → DVModuleThemeMode
-
How this module's look combines with the application's.
no setter
Methods
-
asset(
String path) → String -
Where
pathis served from now: the mounted path when this module was mounted, andpathitself when it is running on its own. -
global<
T> ([T? instance]) → T -
Available on DVModule, provided by the DVModuleGlobals extension
Registersinstancein this module's namespace, or reads what the module shares. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolve(
String path) → String - Resolves a path within this module against its mount point, so module code can build URLs without knowing where it was mounted.
-
setLifecycle(
DVModuleLifecycle state) → void - Framework-only: advances this module's lifecycle state.
-
setMountPath(
String path) → void - Framework-only: re-mounts the module at a different path.
-
table(
String name) → String - The table a model of this module's actually reads and writes.
-
toString(
) → String -
A string representation of this object.
inherited
-
useDatabase(
DVDatabaseAdapter adapter) → void - Framework-and-host: the database this module reads, for a module that was mounted with a database of its own.
-
useShell(
DVModuleShellBuilder builder) → void -
Available on DVModule, provided by the DVModuleShelling extension
Declares the chrome this module's pages sit in. -
useTheme(
ThemeData theme) → void -
Available on DVModule, provided by the DVModuleTheming extension
Declares this module's theme.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited