The arguments to the function are as follows:
contextsupplies the BuildContext to use.
labelis the MenuAcceleratorLabel.label attribute for the relevant MenuAcceleratorLabel with the accelerator markers stripped out of it.
indexis the index of the accelerator character within the
label.charactersthat applies to this accelerator. If it is -1, then the accelerator should not be highlighted. Otherwise, the given character should be highlighted somehow in the rendered label (typically with an underscore). Importantly,
indexis not an index into the String
label, it is an index into the Characters iterable returned by
typedef MenuAcceleratorChildBuilder = Widget Function( BuildContext context, String label, int index, );