MultiGridLevelRow.fromDict constructor
MultiGridLevelRow.fromDict(})
Create an instance with a dictionary of commands
:
Implementation
factory MultiGridLevelRow.fromDict(
final Message label,
final Map<Message, void Function(int index)> commands, {
final List<MultiGridLevelRowAction>? actions,
}) =>
MultiGridLevelRow(
label: label,
getNumberOfEntries: () => commands.length,
getEntryLabel: (final value) => commands.keys.elementAt(value),
onActivate: (final index) => commands.values.elementAt(index)(index),
actions: actions ?? [],
);