insertLiveCommandRegistration function

String? insertLiveCommandRegistration(
  1. String file, {
  2. required String fullName,
  3. required String className,
})

Adds '<fullName>': () => <className>(), to the liveCommands map in file.

Returns the updated file, or null when the command is already registered or the liveCommands map can't be found.

Implementation

String? insertLiveCommandRegistration(
  String file, {
  required String fullName,
  required String className,
}) => insertRegistryEntry(
  file,
  variable: 'liveCommands',
  type: 'LiveCommand Function()',
  key: fullName,
  value: '() => $className()',
);