onSelect method

  1. @override
void onSelect()
override

It's a function that takes no arguments and returns nothing.

Implementation

@override
void onSelect() {
  final List<String> colors = analyzeColor(
    context.read<SelectedColorsNotifier>().colors,
  );
  if (colors.length != 1) {
    widget.state.widget.shakeKey.currentState?.shake();

    return;
  }
  CatInterpreter()
      .fillEmpty(colors.first, CATLocalizations.of(context).languageCode);
  CatLogger().addLog(
    context: context,
    previousCommand: "",
    currentCommand: "fill_empty",
    description: CatLoggingLevel.buttonSelect,
  );
  context.read<SelectedColorsNotifier>().clear();
}