NmPlatformConfigEditor class abstract
What the config panels need from the app's config editor state: the current platform and scope, selector tests against a sample page, and edit operations on the JSON documents. Apps implement it on their editor state (a ChangeNotifier); the panels rebuild when it notifies.
- Implemented types
- Implementers
Constructors
Properties
- current → NmPlatformConfig?
-
The selected platform, or null.
no setter
-
dbColumns
→ List<
String> -
Columns of the target database (mapping targets).
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasSample → bool
-
Whether a sample page is loaded for selector tests.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
sampleIds
→ List<
({String id, String text})> -
Record ids found in the sample.
no setter
- sampleLabel → String
-
Label of the loaded sample.
no setter
- scope → String?
-
County key being edited, or null for the base config.
no setter
- selectedId → String?
-
Id of the selected platform.
no setter
-
tests
→ Map<
String, List< NmSelectorTestResult> > -
Selector test results per field, for the selected platform and scope.
no setter
Methods
-
addField(
String name) → void - Adds a field to the selectors.
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object notifies its listeners.
inherited
-
applyRawJson(
String file, String text) → String? -
Replaces
filewith parsedtext; returns an error text or null. -
createTransformationOverride(
String countyKey) → void - Starts a transformation override for a county.
-
insertJsonList(
String file, List< Object> path, Object value, {int? at}) → void -
Inserts into the list at
pathinfile. -
moveJsonList(
String file, List< Object> path, int from, int to) → void -
Moves an item of the list at
pathinfile. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
rawJsonFor(
String file) → String -
Pretty JSON of
file. -
removeCounty(
String key) → void - Removes a county.
-
removeField(
String name) → void - Removes a field from the selectors.
-
removeJsonKey(
String file, List< Object> path) → void -
Removes the key at
pathinfile. -
removeJsonList(
String file, List< Object> path, int index) → void -
Removes item
indexof the list atpathinfile. -
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that the
object notifies.
inherited
-
revertField(
String field) → void -
Drops the county override of
field. -
revertTransformationOverride(
String countyKey) → void - Drops a county's transformation override.
-
selectorList(
String field) → List< String> -
Fallback selectors of
fieldin the current scope. -
setJsonValue(
String file, List< Object> path, Object? value) → void -
Sets the value at
pathinfile. -
setMapping(
String field, String column) → void - Maps a source field to a database column.
-
setScope(
String? key) → void - Selects a county scope (null = base config).
-
setValue(
String file, List< String> path, Object? value) → void -
Sets the value at
pathinfile(string path). -
testField(
String field) → void -
Re-runs the selector test of
field. -
toString(
) → String -
A string representation of this object.
inherited
-
upsertCounty(
String key, Map< String, dynamic> row) → void - Adds or replaces a county row.
-
writeSelector(
String field, List< String> values) → void -
Writes the fallback selectors of
field.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited