addLiveCommands method

void addLiveCommands(
  1. Map<String, LiveCommand Function()> commands
)

Register commands that run inside the app when called from Metro.

Keys are the category:name from lib/app/commands/commands.json.

nylo.addLiveCommands({
  'cart:seed': () => SeedCartCommand(),
});

Implementation

void addLiveCommands(Map<String, LiveCommand Function()> commands) {
  _liveCommands.addAll(commands);
}