setToWidget method

Group setToWidget(
  1. Widget widget, {
  2. bool useSuccess = false,
})

sets the score to the result of the given Widget JUST one Command should be the input

Implementation

Group setToWidget(Widget widget, {bool useSuccess = false}) {
  return Group(
    prefix:
        'execute store ${useSuccess ? 'success' : 'result'} score ${toString()} run',
    children: [widget],
  );
}