SnapshotSeeder class
The seeder seed <file> runs in metro live: puts a snapshot Metro sent
into the app, recorded like any other seeder so seed:rollback undoes it.
Constructors
- SnapshotSeeder(StorageSnapshot snapshot, {required String name, String? source})
-
Creates a seeder that applies
snapshotundername.
Properties
- description → String
-
One line shown next to the seeder's name when
seedinmetro livelists the seeders.no setteroverride - hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
The name this seeder is recorded under when it isn't registered with
Nylo. Registered seeders run under their key in the registry, and
others under their class name in snake case (
DemoUserSeederisdemo_user), so most seeders leave this null.no setteroverride -
output
→ List<
Map< String, String> > -
The lines written with info, success, warning, error and line.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- snapshot → StorageSnapshot
-
The snapshot to apply.
final
- source → String?
-
Where the snapshot came from, e.g.
pro_user.json.final
Methods
-
down(
) → Future< void> -
Removes the data. Defaults to restore.
inherited
-
error(
String message) → void -
Write an error line to the terminal.
inherited
-
importSnapshot(
Map< String, Object?> snapshot) → Future<int> -
Puts a
snapshottaken withexportinmetro liveinto storage and Backpack, and returns how many values it wrote.inherited -
info(
String message) → void -
Write an informational line to the terminal.
inherited
-
line(
String message) → void -
Write a plain line to the terminal.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
restore(
) → Future< void> -
Undoes everything up changed, newest first.
inherited
-
saveToBackpack(
Map< String, dynamic> values) → void -
Saves each value to Backpack, which lives in memory.
inherited
-
saveToStorage(
Map< String, dynamic> values, {bool inBackpack = false}) → Future<void> -
Saves each value to storage. Maps and lists are saved as JSON.
inherited
-
seed(
List< Seeder> seeders) → Future<void> -
Runs other seeders as part of this one.
inherited
-
success(
String message) → void -
Write a success line to the terminal.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
up(
) → Future< void> -
Adds the data.
override
-
warning(
String message) → void -
Write a warning line to the terminal.
inherited
-
writeOutput(
Map< String, String> entry) → void -
Adds
entry(alevelandmessage) to output.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited